Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Bennat · Oct 27, 2015 at 01:21 PM · editorhierarchycustom

Gibt es eine Lösung/Einstellung für: Hierarchy Custom / My Sort?

Die von mir erstellte Reihenfolge der Objekte in meiner Hierarchie hat einen Grund. Ich kann damit übersichtlich und schnell arbeiten. Weshalb gibt es keine Möglichkeit das diese Reihenfolge so bleibt wie sie ist, sondern nach "irgendeinem" System umsortiert wird? Daran leidet meine Produktivität.

Im Forum finde ich leider nur Diskussionen über die Wahl zwischen Transform- und Alphanumerischer Sortierung. Dies interessiert mich jedoch gar nicht. Ich möchte einfach meine persönliche Sortierung behalten. Ich möchte jetzt oder in Zukunft nicht meine Objekte neu gruppieren oder alphanumerisch umbenennen müssen. Es kann doch nicht sein das man das so machen muss >> A_ObjektOrder, B_Cameras, C_Player, D_Events, E_Lights...

Gibt es eine Lösung/Einstellung für: Hierarchie Custom Sort? Danke!

Mod Edit: Google Translation:

The order of objects in my hierarchy created by me for a reason. I can work with it quickly and clearly. Why there is no way that this order remains as it is, but will be re-sorted according to "any" system? Because my productivity suffers.

In the forum I think, unfortunately, only discussions about the choice between Transform and alphanumeric sorting. This does not, however, interested me. I just want to keep my personal order. I want now or in the future do not need to group my new objects or rename alphanumeric. It may not be what you have to do it that way >> A_ObjektOrder, B_Cameras, C_Player, D_Events, E_Lights ...

Is there a solution / setting: Custom Sort hierarchy? Thank you!

Comment
Add comment · Show 5
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 starikcetin · Oct 27, 2015 at 01:37 PM 0
Share

Unfortunately, you can not modify hierarchy order from scripts as far as i know. But you may think using empty gameObject parents for categorizing, like "Walls, Enemies, SpawnPoints", and empty gameObjects named "-----------------" to simply seperate sections while developing. You can simply remove these empty objects while relasing game.

avatar image npatch starikcetin · Oct 27, 2015 at 01:40 PM 0
Share

I think you can though. You have access to scene transforms in Editor scripts and you can manipulate them, like move them around , enable disabled them etc and even set their parent. So you can definitely use SetAsFirstSibling,SetAsLastSibling,SetParent,SetSiblingIndex as well. $$anonymous$$anipulations like this are used in editor scripts for Pooling solutions.

avatar image starikcetin npatch · Oct 27, 2015 at 01:44 PM 0
Share

Just took a look at siblings, i'm not sure if they have something to do with hierarchy order, are you sure you can manipulate hierarchy sorting with these methods?

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by npatch · Oct 27, 2015 at 01:32 PM

I'm assuming you want something automatic right? If so what kind of heuristics(rules of behaviour) do you want it to have?

One possible solution would be to write an editor script to do that. You can access hierarchy data from them. Not very intuitive when you want to just write sth that works in the background but still can be done.

By having scene data available in editor scripts you can manipulate the scene itself. The sibling index is basically the child index of Transform which is the index with which is shows in the scene hierarchy, 0 being the first.(More info in the Scripting API page of Transform,check out SetSiblingIndex, SetAsFirstSibling,SetAsLastSibling etc.)

You can also see the ordering mentioned in this thread which is Editor-Script oriented: (Scripts) Useful 4.6 Scripts Collection

Comment
Add comment · 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

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Get all items from hierarchy? 2 Answers

Editor Window with settings and Asset Creation 1 Answer

Some changes in hierarcy gone after i run play mode ? 0 Answers

Custom Editor: show asset folders in ObjectField 2 Answers

Extending an editor control 0 Answers


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