Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: dandrea on December 14, 2016, 09:19:23 AM

Title: Advanced Anchors setup problem
Post by: dandrea on December 14, 2016, 09:19:23 AM
Hello

I'm having a hard time setting advanced anchors up on my widgets. It seems it's impossible to add other targets to advanced anchors, they reverting to unified anchors. It's happened multiple times. The scenario is always as follows:

Seemingly, parenting doesn't seem to be the cause (I've tested multiple arrangements in this sense). I've also checked if I was inadvertently creating any cyclic references, but that's not the case.

NGUI version 3.9.9 on Unity 5.3.3.

What am I missing?
Title: Re: Advanced Anchors setup problem
Post by: ArenMook on December 15, 2016, 09:14:36 AM
Well, first please update to the latest. 3.9.9 is quite old now.

I just did a quick check on my end -- made a new scene, ALT+SHIFT+S to make a new sprite, added a new game object, advanced anchor on sprite and changed the left side to be using the new object as its target. Dragging the object resizes the widget as expected, and of course it remains as "advanced" when I select it because it has more than one anchor target.

Unified simply means all 4 anchor targets are the same.
Title: Re: Advanced Anchors setup problem
Post by: dandrea on December 15, 2016, 11:57:07 AM
That's not what's happening here, as you can see. Anyway, this answer means that this is an unknown problem and/or not trivially reproducible one.

Is it viable for you to give a hint or identifier of where in NGUI's code I can find where anchor widgets are set so I can debug the problem here?
Title: Re: Advanced Anchors setup problem
Post by: ArenMook on December 19, 2016, 10:58:18 PM
UIRectEditor.DrawAnchorTransform, on line 153 of UIRectEditor.cs.