Author Topic: Bug? Multiple UIRoots and Panel indication (purple border) offset?  (Read 5846 times)

danfoo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 93
    • View Profile
We have the following situation:
- One UIRoot with panels below it used for the main UI w. interaction, centered at origo
- One UIRoot moved out of player view used for rendering to rendertextures for various displays

Despite some minor hickups the above appear to be working fairly well. However, a child panel to the second UIRoot (which is offset) will still have its camera clipping rect indicated around origo instead of around the actual transform of the UIRoot. Is this really intended behavior, or a is it a bug?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug? Multiple UIRoots and Panel indication (purple border) offset?
« Reply #1 on: December 10, 2013, 09:44:30 PM »
Why two UIRoots? And what version of NGUI? Seems to be where it should be in 3.0.7 f1.

danfoo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 93
    • View Profile
Re: Bug? Multiple UIRoots and Panel indication (purple border) offset?
« Reply #2 on: December 11, 2013, 03:08:10 AM »
3.0.7f1. The UIRoots have correctly set cameras, despite this the panel indicator is oriented around the wrong center and offset from the actual panel location. Please see attached image.

The reason for two UIRoots is simple. We support stereoscopic rendering and use one UI for controls located in world space and another for rendering flat images on display surfaces. These two need to be separated.
I understand that you want NGUI to be as plug and play as possible, but frankly it also needs to be flexible enough and open to more creative use. As in the other thread I posted in yesterday (related to UI attached to fast moving objects) it really needs to be able to handle situations that are not your standard menu-gui. No disrespect intended whatsoever, just constructive feedback from the trenches. ;)

danfoo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 93
    • View Profile
Re: Bug? Multiple UIRoots and Panel indication (purple border) offset?
« Reply #3 on: December 11, 2013, 03:27:37 AM »
Unless I am looking in the wrong place you do have a bug in UIPanel (or intended behavior, not sure):

Line 1381:
  1. Vector3 pos = clip ? new Vector3(mClipOffset.x + mClipRange.x, mClipOffset.y + mClipRange.y) : Vector3.zero;

If there is no clipping it does ignore the actual position of UIRoot. For offscreen rendering (where you want to move the root to more easily isolate it from other objects) this is a (small) issue. I assume the indicated screen size rect does not affect rendering? As far as I can tell rendering works as intended.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug? Multiple UIRoots and Panel indication (purple border) offset?
« Reply #4 on: December 12, 2013, 02:06:53 AM »
Ah this bug. Yes, it has already been fixed 2 days ago in the Professional repository. You'll find the fix in 3.0.7 f2.

danfoo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 93
    • View Profile
Re: Bug? Multiple UIRoots and Panel indication (purple border) offset?
« Reply #5 on: December 12, 2013, 02:36:53 AM »
Ah this bug. Yes, it has already been fixed 2 days ago in the Professional repository. You'll find the fix in 3.0.7 f2.

We clearly need to upgrade to pro. How do we go about proving that we have purchased the basic version in the asset store? Send an email to you with the receipt?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug? Multiple UIRoots and Panel indication (purple border) offset?
« Reply #6 on: December 12, 2013, 06:17:37 AM »
I just need the OR# for the Asset Store purchase. Pro license upgrade is $105 with the existing standard license. In any case, don't post this info here. Email instead -- support at tasharen.com.