Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(tracking): check for initialized ik before setting scale (#15)
  • Loading branch information
Xenira committed Mar 11, 2024
1 parent cd60835 commit 696afd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/src/network/NetworkIkPlayer.cs
Expand Up @@ -1037,12 +1037,12 @@ private void OnScaleChanged(float oldValue, float newValue)
AsyncGameObject.DelayUntil(() =>
{
GetIkPlayer().setScale(NetworkScale);
}, () => GetIkPlayer() != null);
}, () => GetIkPlayer()?.ik != null);
return;
}

var ikPlayer = GetIkPlayer();
if (ikPlayer == null)
if (ikPlayer?.ik == null)
{
Logger.LogError("Scale was changed without an IkPlayer. This should not happen.");
return;
Expand Down

0 comments on commit 696afd3

Please sign in to comment.