Hi guys,
Lest say I have a class A and a CustomEditor class AEditor.
Let’s say I have a WindowEditor which contains a A instance
Is it possible from the WindowEditor to call/display the CustomEditor associated to the A class ?
Thanks
Hi guys,
Lest say I have a class A and a CustomEditor class AEditor.
Let’s say I have a WindowEditor which contains a A instance
Is it possible from the WindowEditor to call/display the CustomEditor associated to the A class ?
Thanks
It’s possible using the Editor.CreateEditor method: Unity - Scripting API: Editor.CreateEditor
You use it like this:
A aObject = .... // initialize an A instance somehow
// Get the registered editor for A (of type AEditor)
var editor = (AEditor)Editor.CreateEditor(aObject);
Thanks !