Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MiguelDeLaCruz · Mar 28, 2011 at 01:29 PM · gameobjecteditorhierarchychildrendocumentation

Hierarchy Foldout Variables Wanted

Hey, I've been wanting to contract and retract certain GameObjects back into their parents by using hotkeys instead of having the designers click on each little arrow.(The Hierarchy tab) I don't think anyone has ever tried to do this before as it seems, even at multiple glances, a rather useless thing to try to do.

Creating a custom hierarchy tab by using editor window means bugs 'r' us.

If, god forbid, they use foldouts in their Hierarchy tab code to show the child and parent relationship and overall organization(which is very likely at this point...), I'd have to access the Hierarchy tab's script and find those individual bools via... Object Id?... Not even sure if I can do that. Has anyone accessed the hierarchy tab and gotten those foldouts? If so I'd be very interested to know 8 r.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image efge · Mar 28, 2011 at 01:59 PM 0
Share

There is the function EditorGUI.Foldout but I do not know if you have access to it for the hierarchy tab.

3 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Statement · Mar 28, 2011 at 03:39 PM

You can hold down alt button when toggling expansion of an object to recursively open or close.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MiguelDeLaCruz · Mar 28, 2011 at 06:13 PM 0
Share

Hm? Hmmm, this could actually be good enough for the designers. I'll see what they say. Good catch sir.

avatar image
2

Answer by Statement · Mar 28, 2011 at 01:47 PM

It sounds like you're talking about EditorGUI.FoldOut. FoldOut

If you want to access the children you can access them from the game objects transform property.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MiguelDeLaCruz · Mar 28, 2011 at 03:11 PM 0
Share

Access to children, easy. $$anonymous$$aking a custom Inspector or GUI using foldouts, easy. Getting the hierarchy tab to contract or retract their children on key command, painful and possibly impossible. The only thing I can think of now is to create a custom hierarchy Tab by creating an editor window. Which I foresee bugs with 8 r. Feature not worth the bugs I say.

avatar image
0

Answer by MiguelDeLaCruz · Mar 28, 2011 at 03:01 PM

Creating a custom hierarchy tab via editor window is out of the question as the bugs would just mount. Therefore Foldouts are a nono.

If, god forbid, they use foldouts in their Hierarchy tab code to show the child and parent relationship and overall organization, I'd have to access the Hierarchy tab's script and find those individual bools via... Object Id?... I hope not... Not even sure if I can do that.

That's why I hope there's some sort of hidden value in Unity's GameObject class. (prays)

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mike 3 · Mar 28, 2011 at 03:04 PM 1
Share

It is done with foldouts, and nothing you can access from GameObject - it'll be something in the hierachy class in the editor somewhere

avatar image Bunny83 · Mar 28, 2011 at 03:58 PM 0
Share

I agree with $$anonymous$$ike. It would be crazy to pack such information into the GameObject class. It's completely useless at runtime. Btw. you should edit your question if you want to add information to your question. You can post your own answer if it's an answer. A question is not a forum-thread. Take a look at the FAQs: http://answers.unity3d.com/faq

avatar image MiguelDeLaCruz · Mar 28, 2011 at 06:07 PM 0
Share

Yeah, after much needed thinking, they wouldn't store that information in the GameObject. Ay, if this is trully needed i'm going to have to find a way to access that hierarchy tab.

avatar image Statement · Mar 28, 2011 at 06:23 PM 0
Share

I have been using reflector to try and peek into the hierarchy window. There exist functions that can expand or collapse those foldouts but they are inaccessible through reflection due to security policies (or so I think - it's impossible to use reflection to invoke those members - I tried). I think the easiest solution is just to hold down ALT button when clicking the arrow. Oh btw, I found out about the ALT button while reading the code in reflector :) Haven't seen it mentioned elsewhere.

avatar image MiguelDeLaCruz · Mar 28, 2011 at 07:28 PM 0
Share

Welp, saved me some work X p. Thanks Statement!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

True scale of a visible GameObject with many childs 1 Answer

Is there anyway to batch renaming via Editor [not on Runtime] multiple game objects in the hierarchy ? 4 Answers

keep gameObject in hierarchy folded when not selected 3 Answers

Get children of another object in hierarchy. 1 Answer

Is there a way to document/leave notes on gameobjects without attaching a component to the gameobject (which adds overhead) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges