Skip to content

Commit

Permalink
fix: Spawner use SetPositionAndRotation
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGadget1024 committed Dec 21, 2024
1 parent ca3dc41 commit d135910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public static GameObject Get(Vector3 position, Quaternion rotation)
GameObject next = pool.Get();

// set position/rotation and set active
next.transform.position = position;
next.transform.rotation = rotation;
next.transform.SetPositionAndRotation(position, rotation);
next.SetActive(true);
return next;
}
Expand Down
3 changes: 1 addition & 2 deletions Assets/Mirror/Examples/Room/Scripts/Spawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ public static GameObject Get(Vector3 position, Quaternion rotation)
GameObject next = pool.Get();

// set position/rotation and set active
next.transform.position = position;
next.transform.rotation = rotation;
next.transform.SetPositionAndRotation(position, rotation);
next.SetActive(true);
return next;
}
Expand Down

0 comments on commit d135910

Please sign in to comment.