I have this script attached to my game object which inherits from another script called Entities, in this script I add the entities script to my game object (which I read is the same as the regular c# instantiation of the class) then called the initialisation function then print those values to check they’re correct, the problem is that this function is now invoked every frame. Why is that?
public class Player : Entities {
private Player playerObj;
void Start(){
playerObj = gameObject.AddComponent<Player> ();
playerObj.Initialise ("Tom", 100, 1, 1);
print(playerObj.getName() + " " + playerObj.getHealth() + " " + playerObj.getPower() + " " + playerObj.getLevel());
}
}