I wrote some code like this and make it a prefab:
class monster:monobehaviour{
private int _health;
public int health
{
get{return _health;}
set{_health = value;}
}
}
the problem is : I can't find a way to fill the "health" in the inspector panel of this prefab,is there a solution? (or I must erase the accessors and make _health public?)
↧