Author Topic: (NGUI 3.0.2) Tweening panel with objects connected via anchors  (Read 2567 times)

hellobard

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 22
    • View Profile
(NGUI 3.0.2) Tweening panel with objects connected via anchors
« on: October 21, 2013, 05:57:26 AM »
Hi,

I was looking at the NGUI 3.0 tutorial video and saw how you anchored sibling objects together. In that regard I have a question in terms of tweening panels using this method.

I have setup for my GUI like this:

Anchor
------Panel (with a TweenPosition)
---------GfxWidget (with an anchor script with container set to BackgroundWidget)
---------BackgroundWidget2

I want to tween the Panel into my scene. Now is this a legitimate setup, or are these anchors connecting each other making it impossible to tween my Panel?

If not, how would one go about tweening such a panel box setup as shown in the tutorial? Would you have to stick to alpha tweens and never change  tween position/scale/rotation?

I could animate each and every object inside my Panel with a separate TweenPosition attached to them, but wouldn't this also get me into trouble with the anchor on "GfxWidget"?
« Last Edit: October 21, 2013, 06:03:00 AM by hellobard »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: (NGUI 3.0.2) Tweening panel with objects connected via anchors
« Reply #1 on: October 21, 2013, 01:22:29 PM »
Yup this is perfectly fine.

hellobard

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: (NGUI 3.0.2) Tweening panel with objects connected via anchors
« Reply #2 on: October 21, 2013, 01:53:01 PM »
Excellent, thank you!

Also, I was wondering if adding an extra panel underneath another panel adds extra drawcalls or if it they all get batched together?

Otherwise, just wanted to say thanks for a great update, NGUI 3.0 is great piece of software. Love how the depth issue was solved.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: (NGUI 3.0.2) Tweening panel with objects connected via anchors
« Reply #3 on: October 21, 2013, 04:45:00 PM »
Each new UIPanel separates the draw calls into a new set.