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...
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
22 People are following this question.
Custom HUD Hierarchy in Editor Window
Display File View in Custom Editor
Right Click in Custom Editor?
Text Labels For Prefabs in Hierarchy Turn Pink