Hey guys, I’m in the middle of a stump I can’t seem to figure out.
Okay, this line of code WORKS
cList.Add (new Camera ()); cList.Add (new CanvasRenderer ()); cList.Add (new Canvas ()); cList.Add (new CanvasGroup ());
However, CanvasScaler won’t work
cList.Add (new CanvasScaler());
Which gives me these errors.
I have already tried doing public CanvasScaler scaler; and adding scaler to the List. Which doesn’t throw any errors, at least until I try to debug log it. Then it says it doesn’t exist…
What is messing it up is the new CanvasScaler() inside the list
Everything else works but CanvasScaler.
All I’m trying to do is store all the Unity Components into a List so I can later use them.