Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity public static variable

Static variables in Unity. A static variable in Unity is a variable that is shared by all instances of a class. To mark a variable as static in Unity, simply add the static keyword when declaring it. Then, to access the variable, instead of referring to an instance of the class, you can access it via the class itself.
 
PREVIOUS NEXT
Tagged: #unity #public #static #variable
ADD COMMENT
Topic
Name
9+3 =