@kaworucloud Glad it helped.
You can definitely remove the following redundant line:
m_SkeletonGraphic.AnimationState.Update(0);
This is because the line m_SkeletonGraphic.Update(0);
below calls AnimationState.Update(0)
automatically.
Whether the line m_SkeletonGraphic.Update(0);
can be removed as well depends on your script's script execution order, when your script's Update
method is called. If your script is executed before SkeletonGraphic, it is safe to remove m_SkeletonGraphic.Update(0);
because it will be called in the same frame after your script anyway. If your script executes after SkeletonGraphic
, you have to keep the call to see the effect in the same frame.
See this documentation section on script execution order.