I have a string instance variable in my family of objects that is originally set to "". I want to do something when it's not "". But my condition [variable not equal to ""] returns true even if the string is "" (and it's showing as "" in the debugger). I had similar issues in the past and got around it using the condition [variable > ""] but that's not working this time. Is there a better way to check if a string is an empty string? Should I not be setting it to "" in the beginning?
Thanks
Yes, you shouldn't set "" for the initial value for your variable.
Develop games in your browser. Powerful, performant & highly capable.
Thanks! I made the change and it worked. I also noticed that in the underlying code, setting the initial value to "" results in:
"initialValue": "\"\""
but not setting any initial value results in:
"initialValue": "",
Good to know :)