Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# Enum

public enum Enum_example {One, Two, Three, Four}
// Enum_example can have the values: Enum_example.One, Enum_example.Two, Enum_example.Three, Enum_example.Four

public class Example : MonoBehaviour {
    Enum_example Enum_Var = Enum_example.Three;
    // Enum_Var is a variable with the value Enum_example.three.
}
 
PREVIOUS NEXT
Tagged: #Enum
ADD COMMENT
Topic
Name
6+5 =