Author Topic: Normalize depth hierarchy problem  (Read 9391 times)

FoxQ

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Normalize depth hierarchy problem
« on: May 02, 2015, 01:52:34 AM »
Hi:

I have some question about "Normalize depth hierarchy".

Usually I set the depth of widget with a interval so that I can insert a widget without changing other depth.

For example:
sprite 1: depth 100
sprite 2: depth 110
Without changing the depth of these two sprite, I can insert a widget between sprite 1 and sprite 2 by setting the depth of new sprite as 105.

Today I clicked the button "Normalize depth hierarchy" in menu accidentally. All active widgets' depth changed.
It can't undo unless I give up all changes since last save.
I start looking for any information about "Normalize depth hierarchy".
Here's two question I don't understand:

1. Why this function only affect active gameobject? It means that it actually change the order of these widgets, right? (or I should keep every widget active?)


2. What if I need to insert a widget between two widgets.. for example, I have widgets with depth 1, 2, ...., 100.
    When I want to insert a widget between depth 50 and 51. I have to resort all widgets with depth bigger than 51?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Normalize depth hierarchy problem
« Reply #1 on: May 02, 2015, 10:06:00 PM »
Normalizing depths simply puts them in order: 0, 1, 2, 3, etc. It's true that it makes it more difficult to put things "in-between", but you can also use ALT+SHIFT+= and ALT+SHIFT+- to adjust selected groups of widgets' depths at once, bringing them forward or back.

FoxQ

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Normalize depth hierarchy problem
« Reply #2 on: May 02, 2015, 10:44:04 PM »
Thanks for the answer. Another question, why normalizing depth affect active GameObject only? It DO actually change the order of depth when some GameObjects with widget are inactive just like the photo attached. Or am I wrong on something I should avoid?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Normalize depth hierarchy problem
« Reply #3 on: May 03, 2015, 04:28:12 AM »
Unless you have a specific purpose with it, there's no reason to normalize the depth. It doesn't really make any difference what the numbers are so there's very little gained by normalizing, conversely you can lose the setup you've made at design time if you rely in specific depths for elements you load dynamically, like what you show here.


FoxQ

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: Normalize depth hierarchy problem
« Reply #4 on: May 03, 2015, 05:32:20 AM »
I have no any reason to normalize it.

However, there are a button in menu. If you click it accidentally, it will do it without any warning window and you can not undo it.

Just a suggestion: When clicked, double check with developers and notify that it can't undo. :)