Answers for "unity how to access a static variable"

C#
3

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.
Posted by: Guest on August-04-2021
-2

how to reference a static variable from another script in unity

otherScript.staticVariableName...
Posted by: Guest on November-02-2020

Code answers related to "unity how to access a static variable"

C# Answers by Framework

Browse Popular Code Answers by Language