I'm experiencing a really weird bug using the latest version of unity and the IDE is visual studio 2015 community. I have a button which triggers a function when it's clicked and also sends a short string as a parameter. In the method I first check if the string is null or empty, and I run some code if that's the case else I run some other code (caption obvious).. The problem is that the parameter is neither null nor empty however the first condition is being triggered, I'm 100 % sure because I logged the result of the operation like this Debug.Log("elementType : " + elementType + " result : " + string.IsNullOrEmpty(elementType));
and it basically prints fire.. false
also I ran debugger to make sure that the parameter is not empty but it got even weirder after the if condition got triggered the else statement also got triggered !
Here's a video where i show the problem : http://screencast.com/t/iRtXtQaMDh8K.
And here's a screenshot of the debug.log : http://prntscr.com/bv0xsg
I've tried restarting both Unity and visual studio but no with no luck. I also put a lock
on the method in case somehow magically some other thread access the same method at the same time which is certainly not the case again no luck.