I have some public float, integer and color variables which can be set in the inspector, it’s not required to set all of them, but how can I check if they’ve been set?
My idea is to add -1 as default value for the float and integer variables, but whats about the color variable or if the float/int variables also accept negative values?
Is there a proper way to do this?
1 Answer
1
Don’t know, but:
Traditionally, the default values would be something reasonable, so orc hitPoints set to 10, speed set to 7, skinColor dark green… . Then the code wouldn’t care why something had a certain value (default value or human set.) And, the human has to do a lot less work (also, imagine hitPoints and speed start at -1. What should I set them to? Starting at 10 and 7, I know tough. slow orcs are 15 and 6.)