Author Topic: Nicki's Depth Management Tool  (Read 26460 times)

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #15 on: October 11, 2013, 12:59:34 AM »
I actually stumbled on just that yesterday as well. If the UITexture is using Unlit/Texture it's lower in the render queue in shader, which makes it be under the other stuff if it's at the same z. Hilariously, if you move the Z position so it's in front, it will go in front of the other 2d. Change it to Transparent/Colored for a quick fix.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #16 on: October 11, 2013, 06:54:19 AM »
Could have sworn I already changed UITexture to use Unlit/Transparent Colored... Well, open up UITexture and change it on line 60.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #17 on: October 11, 2013, 07:16:46 AM »
@Chris: Your idea of adding a material ID sorting clause in there is actually a nice one. I'll add it to the NGUI's core.

Miau

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #18 on: October 11, 2013, 08:41:28 AM »
@Nicki
Thanks for providing this tool. It really IS handy!

ChrisPruett

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 24
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #19 on: October 11, 2013, 09:10:27 AM »
@ArenMook Cheers!

@Nicki Thanks for the tool from me as well.  I modded to watch the actual renderQueue value while debugging the UITexture thing.  Very useful!

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #20 on: October 11, 2013, 09:14:12 AM »
I actually have a significantly improved version that I'm using now. It's more akin to how UIPanel does things now. See the attachment.

If you guys have any improvements, please suggest or post your modifications. :)

Miau

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #21 on: October 11, 2013, 01:32:06 PM »
I get some compilation errors with the new version:

Assets/Editor/UIDrawCallOverview.cs(88,56): error CS1061: Type `UIDrawCall' does not contain a definition for `baseMaterial' and no extension method `baseMaterial' of type `UIDrawCall' could be found (are you missing a using directive or an assembly reference?)

Assets/Editor/UIDrawCallOverview.cs(88,29): error CS1502: The best overloaded method match for `UnityEditor.EditorGUILayout.ObjectField(string, UnityEngine.Object,
System.Type, params UnityEngine.GUILayoutOption[])' has some invalid arguments

Assets/Editor/UIDrawCallOverview.cs(88,29): error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Object'

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #22 on: October 11, 2013, 03:18:57 PM »
Ah, you need the newest NGUI I think - wait until the next update comes out, unless you have pro.

ikuniojp

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #23 on: November 14, 2013, 09:15:09 PM »
Nope,
No joy here too.
No pro
We didn't know there's a Pro version
Would have got that.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #24 on: November 15, 2013, 05:12:47 AM »
Doesn't it work in 3.0.5 for you?

ikuniojp

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #25 on: November 17, 2013, 08:39:14 PM »
No, I get the same error message as Miau got :(

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #26 on: November 19, 2013, 04:40:04 AM »
OK I think I'll update my project to the newest NGUI version now and see if I get the same error, then I can fix it. :)

ikuniojp

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #27 on: November 19, 2013, 09:04:50 PM »
Zip-a-Dee-Doo-Dah  ;D

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #28 on: November 20, 2013, 03:59:13 AM »
I'm using it in 3.0.6 right now, and I'm not seeing this problem..

Are you using the new one from http://www.tasharen.com/forum/index.php?action=dlattach;topic=6166.0;attach=2804 ?

ikuniojp

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 29
    • View Profile
Re: Nicki's Depth Management Tool
« Reply #29 on: November 21, 2013, 09:05:18 PM »
I'm using it in 3.0.6 right now, and I'm not seeing this problem..

Are you using the new one from http://www.tasharen.com/forum/index.php?action=dlattach;topic=6166.0;attach=2804 ?

Is 3.0.6 out for standard?
I was going to get a pro license,
was waiting for email reply but got none.
Weary to update now :(