I have two classes one is an editor (extends Editor) and other is a MonoBehaviour one (the target class).
On “OnInspectorGUI()” method I get access to the MonoBehaviour class through the target:
public override void OnInspectorGUI()
{
var script = (PackScript) target;
script.Awake();
}
However I’ve noticed when I’m accessing PackScript class, the Awake() is not called by Unity and I need it to accomplish some routines, then I decided to call it manually and I’m not sure if this is a good idea or it breaks some design pattern, I don’t know.
Is it supposed to act like this in the case of Unity doesn’t call Awake from a target object?