I’ve been mucking about with creating editor scripts for use in future projects, but I’m always hit a brick wall when deciding which object to make. From what I’ve read, Editor scripts are attached to game objects, generally ScriptableObjects, to serialize data and are seen within the Inspector. Meanwhile, EditorWindows are not attached to game objects and appear within the toolbar near the top of the screen. However, the only things I really know about the two methods are their appearances and locations on the screen.
Do any other differences exist for Editor objects and EditorWindows? When should I reuse one over another? From my experience with coding Editor scripts, it seems more efficient to make EditorWindows, as they’re not attached to a game object which may not be included in a level I need it in due to some fault of my own.
To give any context, I’m making an Editor script which will allow users to control where and when a group of enemies will be spawned into the world. For now, I’m tinkering around with displaying the group within a circle on the ground and displaying their positions using Unity primitives. I’ll be using this script throughout the duration of the project, so it needs to be flexible for things like bosses, spawn patterns, and the like.
Should I use an Editor object or an EditorWindow for this solution?