So, I have the monobehavior BaseUnit, a class of BaseUnit called MobileUnit, and a class of MobileUnit called ShipFafher. Both MU and SF have in their void Update base.Update().
A SF script, however, will execute the SF and BU Updates, but not the MU. So that’s my problem, I need the middle man to cooperate.
1 Answer
1SF should declare public override void Update not public void Update.
Just an example, I’m not sure which accessibility modifier you’re using.
If still not cascading the override for all the child classes, do so.
I'm afraid it didn't work. It gave the error: error CS0506: 'ShipFather.Update()': cannot override inherited member 'BaseUnit.Update()' because it is not marked virtual, abstract, or override I changed BU Update to the only version it wouldn't give another error, public virtual void Update, and it still didn't work. But I found the error, so even though I'm feeling stupid, thanks for your time. MU Update was private.
– Marcos_Bravo