Skip to content

Commit

Permalink
Hot Fix Pools
Browse files Browse the repository at this point in the history
  • Loading branch information
PixeyeHQ committed Jun 22, 2020
1 parent 00640f4 commit 5459c21
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Runtime/Core/ImplObj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ public T Create<T>(GameObject prefab, Vector3 startPosition = default, Quaternio
public Transform Create(int poolID, GameObject prefab, Transform parent, Vector3 startPosition = default,
Quaternion startRotation = default)
{
//SceneManager.MoveGameObjectToScene(tr.gameObject, layer.Scene);
//tr.SetAsLastSibling();

return layer.pool.pools[poolID].Spawn(prefab, startPosition, startRotation, parent).transform;
var tr = layer.pool.pools[poolID].Spawn(prefab, startPosition, startRotation, parent).transform;
SceneManager.MoveGameObjectToScene(tr.gameObject, layer.Scene);
return tr;
}

public T Create<T>(int poolID, GameObject prefab, Transform parent, Vector3 startPosition = default,
Expand Down

0 comments on commit 5459c21

Please sign in to comment.