Interactable in procedural levels

gurayg

New member
Hi,

My game creates levels at runtime.
While creating interactable objects, I'm adding "Interactable" component to them. Of course that makes their Awake method to be called before I can set its "MonoBehaviour[] Targets" array thus I get "Error: An IInteractableTarget must be specified in the Targets field".

Would it be possible to have a public virtual Awake instead of private void and have the Initialization code in a public method?
This way procedural projects can have custom classes deriving from Interactable and call Initialize at a suitable time?

I'm not sure if this is the right way to handle such a problem but it is the one I could find.
 
Back
Top