Created
June 20, 2019 20:19
-
-
Save JArmando/8544270fb3a0aac2d2d6cf282ff49b7d to your computer and use it in GitHub Desktop.
Static properties for value classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Blabler{ | |
string Text {get;set;} | |
int A {get;set;} | |
int B {get;set;} | |
int C {get;set;} | |
public static Blaber Blah = new Blabler { A = 1, B = 2, C = 3, Text = "Blah" }; | |
public static Blaber Bleh = new Blabler { A = 2, B = 3, C = 4, Text = "Bleh" }; | |
public static Blaber Bluh = new Blabler { A = 44, B = 13, C = 34, Text = "Bluh" }; | |
} | |
Debug.Log(Blaber.Blah); // This will have A = 1 and Text = "Blah" | |
Debug.Log(Blaber.Bleh); // This will have A = 2 and Text = "Bleh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment