Rotating 2D bone while animation is playing.

Hello, I’ve been struggling with this issue for a while and i haven’t been able to figure it out.

I want to rotate my characters chest bone towards the mouse position and i have that all worked out but the issue is that when i rotate the bone the sprite doesn’t follow.

I am rotating the bone in LateUpdate and it does in fact rotate to my desired position but still does nothing to my characters animation.

Any help on this issue would be great as i have been stumped for a few days…

Here’s a video showing what is happening.

bone rotation not affecting sprite

Thanks to MarekUnity on the unity forum for his help.

The solution was to add [DefaultExecutionOrder(-2)]

example:

[DefaultExecutionOrder(-2)]
public class YourScript : MonoBehaviour
{

}