I need a good way for creating player and enemy scripts. I want both to have the same data as far as stats go(str, spd, health, etc). I implemented a OO Design by having a Pawn class holding all this data and having Player and Enemy derived from it, but I am unable to see the Pawn’s properties in editor when placing the child(Player or Enemy) scripts on a object. I am guessing I would have to remove the inheritance to place the Pawn script AND a (Player or Enemy) script on a object. I would then have to access Pawn through a variable?
I’ve used inheritance with Unity scripts and haven’t had any trouble with inherited fields showing up in the editor.
What language are you using? Can you post some example code showing what you’re doing?
If you’re using C# and haven’t explicitly marked your variables as public or private, they will be private by default. (they need to be public to be visible)
ahhh, it was not set to public. Thanks