- Home /
Display object in the inspector via script
I'm making a custom GUI and I want to make it so that when you click a button, that button's object is displayed in the Inspector.
I'm sure this is really easy, but I can't see to find it in the documentation...
Any ideas?
Comment
Answer by sharsnik · Nov 26, 2011 at 06:59 AM
Sorry, I figured it out.
Selection.activeObject = .gameObject;
I feel silly...