Skip to content

Commit 527d2de

Browse files
authored
Update Pool.cs
1 parent 920fb05 commit 527d2de

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Runtime/Pool.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,14 @@ public GameObject Get(Transform parent, bool worldPositionStays)
7878
return instance.gameObject;
7979
}
8080

81-
public GameObject Get(Vector3 position, Quaternion rotation) =>
82-
Get(position, rotation, null);
81+
public GameObject Get(Vector3 position, Quaternion rotation)
82+
{
83+
var instance = GetInstance();
84+
85+
instance.transform.SetPositionAndRotation(position, rotation);
86+
87+
return instance.gameObject;
88+
}
8389

8490
public GameObject Get(Vector3 position, Quaternion rotation, Transform parent)
8591
{

0 commit comments

Comments
 (0)