Author Topic: [SOLVED]Can't figure out how UIPanel.LateUpdate is called in Animation Playback  (Read 2461 times)

sulbon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
 >:(

But the 'LateUpdate' in my script on the same GameObject(with UIPanel) is not called.

Could somebody tell my why?
« Last Edit: November 26, 2014, 09:12:35 PM by sulbon »

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Because Unity calls it, since it's a monobehavior. See http://docs.unity3d.com/ScriptReference/MonoBehaviour.html

sulbon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Hi Nicki, I think I didn't make the question clear.

The 'Update' and 'LateUpdate' are called every frame when Application is playing. It is for sure and I can totally see it.

What I don't see is what magic triggers the UIPanel.LateUpdate not during Game-Running, but when the Animation is editing(in Animation Tab).

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Oh. I believe it will be called when the scene gets updated for whatever reason.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
[ExecuteInEditMode] above the class name is what makes it possible.

sulbon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Thank you ArenMook and Nicki. [ExecuteInEditMode] works.  ;D