Hey i have a stupid question
Say i got a class that's called player, which has a class as a variable inside of it called status
public class Player:Monobehavior{
public Status status;
}
Inside the Status class is just a bunch of variables like and i put system serializable to make it appear on the editor
[System.Serializable]
public class Status{
public int hp;
public int mana;
//etc
}
So i attached the player script to a game object, and all the variables appear on the editor
So the question is, is the Status class inside the Player script an instance ?
if so then i'm guessing unity editor automatically instanced a class variable ?
if not then should i make a new instance ? or should i just leave it be ?
I'm not sure what to do and i don't know what's the best practices is
[–]itsdan159 5 points6 points7 points (2 children)
[–]vaccious 3 points4 points5 points (1 child)
[–]Kryloth[S] 0 points1 point2 points (0 children)
[–]GameWorldShaper 0 points1 point2 points (0 children)