Author Topic: Moving nested panels  (Read 3121 times)

Zhugie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Moving nested panels
« on: September 26, 2014, 11:49:11 AM »
In my game I have a chat menu that slides on from the left of the screen. The whole of the chat menu is one panel and it contains a uiscrollview for the actual chat messages. When I make the chat panel slide on sometimes the scroll panel moves further then the chat panel. If I adjust anything in the heirachy the panel instantly jumps to the correct position

What could be caused this and is there anyway to fix it?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Moving nested panels
« Reply #1 on: September 27, 2014, 06:57:08 PM »
I'm not sure what would cause something like that in your case. I had something similar happen in Windward a while back. I have a scroll view inside another panel -- and this other panel gets scaled from 0.8 to 1.0 when it first opens up. This caused the scroll view to become blurry inside. I had to mark it as changed at the end of the animation for it to become crisp. Everything was in place though, just not crisp. Maybe related though?

Zhugie

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Moving nested panels
« Reply #2 on: September 29, 2014, 10:15:38 AM »
Hmm calling setdiry() on the panel during the animation helps a bit. The scroll panel now ends up in the right place but it "bounces" to get there. Goes to far then goes back a bit

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Moving nested panels
« Reply #3 on: September 30, 2014, 03:40:26 AM »
Ah, I'm guessing Unity's animations don't mark the transform's hasChanged flag correctly.