Answer the question
In order to leave comments, you need to log in
How to add a variable to all objects?
I'm making a 2d platformer with Unity2D. I need all objects to have a bool canwalk variable or the ability to set this variable in the script. How to do it?
I think that this is done through classes, but I did not understand them.
Answer the question
In order to leave comments, you need to log in
Well you are making a Walker class. Add it
And then, all your classes inherit from Walker protected bool canWalk {get;set;}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question