Skip to content

Reply To: Extensions for Editor

Home Forums Developer Concurrency Kit Extensions for Editor Reply To: Extensions for Editor

#541
Administrator
Keymaster

Hi George, I think this ought to work even in the editor, just be careful to manage your instances.

static MonoBehaviour CreateBehaviour()
{
  GameObject go = new GameObject("EditorBehaviour");
  GameObject.DontDestroyOnLoad(go);
  go.hideFlags = HideFlags.HideAndDontSave;
  return go.AddComponent<MonoBehaviour>();
}

Comments are closed.