I have a Parent class:
public class Base : MonoBehaviour
{
protected void Awake()
{
print("Do some stuff");
}
}
And a child class that derives from Base:
public class Sub : Base
{
void Awake()
{
print("ALSO do this stuff!");
}
}
Unfortunately I’m still fairly new to programming and do not understand types such as abstract, virtual, etc. I only understand how to use private, public, and protected.
If you haven’t figured it out already, what I want is for a base class to have something to do. Any class that derives from this should also do these things, and then do more stuff after it.
I need this in the Awake() method so that it gets called when the object is instantiated.
Thanks for any help!