- Home /
Selecting an object in the scene would assign it to an empty gameobject in the inspector
I have written a custom inspector. Basically it has an empty gameObject slot, you drag&drop an object there and can then modify it with given buttons. It all works fine, but the drag&drop isn't very work-flow-friendly. I know that clicking an object in the hierarchy or in the scene highlights it, but how could I enable my custom editor to pick that up as well and assign it to the empty gameObject I have in the script? I code in c#.
Answer by PhoenixBlackReal · Mar 04, 2015 at 12:56 PM
http://docs.unity3d.com/ScriptReference/Selection-activeGameObject.html A moment after posting the question, just had to formulate the question precisely...
Your answer
Follow this Question
Related Questions
Custom HUD Hierarchy in Editor Window 2 Answers
Overwrite the inspector window on Scene Asset heading chosen in the hierarchy window 0 Answers
I have some question about custom Hierarchy 0 Answers
Images blocking buttons? 2 Answers
Project Hyerarchy problem? 0 Answers