Skip to content

Commit 566ae0c

Browse files
Update README.md
1 parent 0000f66 commit 566ae0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Assets/Scripts/ObjectPooling/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
In my example I have a custom Object created by me called **CubeObj** it doesn't do much, but it helps with the example. So when you spawn an item in the scene you have to give the function the following parameters:
3232

3333
>**Type** the typeof object that the list needs to look for and spawn it in the scene
34+
3435
>**Position** the position where the item should spawn
36+
3537
>**Rotation** the rotation of the item
3638
37-
One more thing to remember. Pool has a functio to bring back the objects to the pool, but it requires the object as a parameter. That's why I made an interface called **IPoolActions** that comes with **ReturnObjectToPool** void and will help you return the items to the pool. It's pretty easy, to return an item you simply have to **gameobject.SetActive(false)** and also reset its position **transform.position = Vector3.zero**.
39+
One more thing to remember. Pool has a function to bring back the objects to the pool, but it requires the object as a parameter. That's why I made an interface called **IPoolActions** that comes with **ReturnObjectToPool** void and will help you return the items to the pool. It's pretty easy, to return an item you simply have to **gameobject.SetActive(false)** and also reset its position **transform.position = Vector3.zero**.

0 commit comments

Comments
 (0)