I’ve been wondering about this. Let’s say I derive from a base class that inherits from MonoBehaviour and I want another class derived from this base class to contain some MonoBehaviours. IE…
(I seem to be having problems pasting code here without the formatting screwing up. Here’s a pastebin link - public class Obj_Base : MonoBehaviour{ protected void Start() { - Pastebin.com )
This works but the issue is that you’ll get this error.
Assets/Scripts/Obj_Base.cs(7,10): warning CS0108: `Obj_Derived.Start()' hides inherited member `Obj_Base.Start()'. Use the new keyword if hiding was intended
So I can use the ‘new’ keyword to get rid of this warning but is this the more elegant solution to what I want to achieve? Is there a better method/design that can be used?