- Home /
Question by
brigadir · Sep 15, 2013 at 10:31 AM ·
editorcomponentinheritance
Script component in Editor vs. runtime-dependent inheritance
Here is my situation: I have script ObjectController
attached to game object in editor. Now I want to redesign this class to ObjectPlayerController
and ObjectAIController
inherited from abstract Object controller. The problem is that ObjectController component is created behind the scene, but I need to choose what child class it should be depending on runtime situation.
Is it possible to do this? Or I must exclude this script component in editor and add it at runtime.
Comment