|
Does Unity provide an editor script event for GameObjects being added or removed from the scene/hierarchy? I've been looking through the Editor Classes and haven't found anything that does what I want. I want to detect when the user adds/removes any GameObject to/from the scene and handle it in an editor script.
(comments are locked)
|
|
check out EditorApplication.hierarchyWindowChanged EditorApplication.projectWindowChanged There isn't much documentation on these, so have at look at this forum thread: Forum - EditorApplication.hierarchyWindowChanged Basically, you are assigning a delegate somewhere in your editor code that fires off when either the hierarchy or project windows change.
(comments are locked)
|
