Editor Script Without GameObject
Is it possible to dynamically load UnityEditor.Editor
scripts without them having a GameObject
being associated?
The reason for this is I want to have a settings ScriptableObject
which contains a lot of fields, but don't want all those fields all together in a hard to navigate inspector. I want to be able show a variety inspector windows that each only allow editing a portion of my settings ScriptableObject
.
Example:
[MenuItem("Settings/Example1")]
private static void SelectExample1Settings()
{
Selection.activeObject = CreateInstance<Example1SettingsObjectEditor>();
}
So I may have multiple menu items, each opening its own editor script, all of which would point to the same settings ScriptableObject
.
Currently, when I run this I always get a blank and empty inspector with my only option being:
Script None (Mono Script)
Your answer
Follow this Question
Related Questions
Weird issue with GetComponent().sharedMesh.uv 0 Answers
BuildPipeline.BuildPlayer() missing splash screen tools background. 1 Answer
How to get the name of a model file(fbx) contained in a certain prefab with scripts? 1 Answer
Lighting Bug in Unity Editor (2018.2.7f1) when instantiating prefab from AssetBundle 0 Answers
Adding custom edits to scene window 0 Answers