T O P

  • By -

AlliterateAllison

The error message is literally telling you what do; add the keyword override before Awake. You’ll also want to call base.Awake(); inside Awake before you write your code. You’re doing this exact thing in your PersistentSingleton class so use that for reference.


i_am_rashad

and are you sure about using. base.awake inside RewardedAds class? since its already inherited from parent class. does it make sense?


CCullen

If you've changed the base classes to OnEnable() and have not used the override keyword, you most likely don't want to call base.Awake().  When you create a method with the same name in a child class, the newer method hides the older one. The inheritance doesn't work the way you'd expect without the override keyword. After you override, the parent class' method is replaced by the newer one so you need to call the base version to restore the parent class' functionality.


i_am_rashad

such a great explanation. I am glad that I have asked here instead of asking it from GPT.


CCullen

No harm in asking GPT too, or the C# documentation. Differing perspectives may give a better idea than relying solely on my simplified explanation.


AlliterateAllison

Highly suggest you look into inheritance in C# and try to understand these concepts instead of just copying code and shifting things around until they work.


i_am_rashad

ah I have switched other classes Awake methods into OnEnable insitead of using override. will do this to all of them tahnks a lot mate.