Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: iron59 on July 28, 2015, 06:27:25 AM

Title: Anchors Not Updated Immediately
Post by: iron59 on July 28, 2015, 06:27:25 AM
Good day. I have a UI sprite that acts like a sliding window. I'm using an anchor to keep that window at the edge of the panel. However, I've observed that changing the resolution in the game window does not apply the anchor immediately as you will see in NewRes.png. The red window is still pixels apart from the edge of the panel. However, when I click the resolution dropbox of the game window (take note, I haven't changed the resolution yet, just expanding the drop-down component), the window is moved to its proper position. I think this behaviour is carried over to the actual build as I see incorrect positions of my window in my test device (asus zenfone 5). Any suggestions on how to resolve this? Thank you very much.
Title: Re: Anchors Not Updated Immediately
Post by: ArenMook on July 28, 2015, 06:45:15 PM
What are your anchor's settings? Only Update type anchors will update every frame.
Title: Re: Anchors Not Updated Immediately
Post by: iron59 on July 30, 2015, 07:46:53 PM
The Execute attribute is set to On Update. For what it's worth, I'm using Unity 5.1.0f3 Personal Edition. NGUI version 3.8.0.
Title: Re: Anchors Not Updated Immediately
Post by: ArenMook on July 31, 2015, 10:00:17 PM
Please update your NGUI to the latest version before seeking support.
Title: Re: Anchors Not Updated Immediately
Post by: iron59 on August 02, 2015, 07:33:08 PM
Sorry about that. I updated my package to 3.9.1. The outcome is still the same. Still having a problem with the anchors.
Title: Re: Anchors Not Updated Immediately
Post by: ArenMook on August 05, 2015, 07:56:17 AM
Ok reading your post I think I see two issues.

1: Changing the resolution doesn't update the anchor right away. Are you talking about changing the resolution in the editor? What do you use to change it? I need more info here.

2. Your anchor doesn't update properly on your mobile device when you build the app. Is the mobile platform the only one affected? What about other platforms? Can I reproduce it on my end somehow using stock NGUI example scenes?