Skip to content

Commit

Permalink
fix: NRE when Move Independently is placed on a scene root (#1321)
Browse files Browse the repository at this point in the history
Closes: #1317
  • Loading branch information
bdunderscore authored Oct 27, 2024
1 parent efa263b commit 1153abd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Runtime/MAMoveIndependently.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ void OnUpdate()
return;
}

if (transform.parent == null) return;

var pos = transform.localPosition;
var rot = transform.localRotation;
var scale = transform.localScale;
Expand Down

0 comments on commit 1153abd

Please sign in to comment.