Author Topic: Odd drag panel behavior when tweening parent object.  (Read 7609 times)

dillrye

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Odd drag panel behavior when tweening parent object.
« on: February 11, 2014, 03:38:37 PM »
Hello, I have a control structured like so:


MySettingsObject
    ScrollView
       Grid
          Item0
          Item1
          Item2
          etc

Item's are as follows:
ItemObject (with box collider)
    Sprite
    TextLabel

I am tweening "MySettingsObject" into the scene to slide in the panel.  When I do this, sometimes the Items are offset and not in their correct positions.(About 50 pixels off in the x direction).  Now here is the really odd part.  Neither of them have x values that are 50 pixels off(the inspector shows 0), and if i turn the object off/on again in the inspector it will draw them in the correct place. If i look at the Item's base object, its box collider is in the correct place, but it looks like the meshes for the sprite, and text are not being updated when moved until i disable/enable the game object.

Do you have any ideas?



pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Odd drag panel behavior when tweening parent object.
« Reply #1 on: February 11, 2014, 04:24:38 PM »
Any chance you have 'Static' turned on in any UIPanel script attached, this caused me similar problems before.

dillrye

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: Odd drag panel behavior when tweening parent object.
« Reply #2 on: February 11, 2014, 05:07:37 PM »
I had the same thought, but I don't have anything marked static in my entire scene.

Just to note, this behavior seems to happen in more than one place in my app(but only after I tween an object containing a scrollview).

dillrye

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: Odd drag panel behavior when tweening parent object.
« Reply #3 on: February 11, 2014, 05:35:07 PM »
Just wanted to add that I am able to reproduce the behavior in a barebones scene. 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Odd drag panel behavior when tweening parent object.
« Reply #4 on: February 11, 2014, 07:42:40 PM »
Can you send me a repro case to support at tasharen.com? It would help. :)

dillrye

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: Odd drag panel behavior when tweening parent object.
« Reply #5 on: February 12, 2014, 11:28:06 AM »
Hi ArenMook,
 I  have sent a repro project to the support email address, I did not include the NGUI folder, but I have been using the latest from github.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Odd drag panel behavior when tweening parent object.
« Reply #6 on: February 13, 2014, 01:03:02 AM »
Check the latest version on github. I don't actually see anything wrong with your example in it. The content is always positioned properly.