Edit: can’t delete the questions sorry, the problem was coming from my code (due to delay, start method is call after a method that should be executing after)
Hi there, I’m driving myself crazy. Took a look at other questions related to inheritance but didn’t find the solution I just want a simple inheritance model. Here is my code :
public abstract class Item : MonoBehaviour {
protected virtual void Start () {
print("basestart");
}
protected virtual void Update() {
print("baseupdate");
}
}
public class SubItem: Item {
protected override void Start () {
base.Start();
print("substart");
}
protected override void Update() {
base.Update();
print("subupdate");
}
}
The start process works ! But none of update method is called
How can i do this in Unity ? What is the good way to achieve this or the best practice ?
Thanks for any help !