kaiyum
1
Hi, currently I have 14 properties nicely loaded up. I want something like:
public static Vector2 i1,i2,i3 {get; private set;}
This way I can maintain code easily. Looks like unity/c# does not let me do this. What am I missing?
You cannot declare multiple properties in C# in one line like you’re attempting to in your code. You will have to do something like this:
public static Vector2 i1 { get; private set; }
public static Vector2 i2 { get; private set; }
...
Also, be aware that although you can use static fields/properties in code just fine, they will not show up anywhere in the Editor - you can use the singleton pattern with serialized private backing fields, but that’s a separate issue.