File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ public class Spawner : MonoBehaviour
1919
2020 private void Awake ()
2121 {
22- // Use this only with Prefabs
2322 _prefab .Populate (count : 50 );
2423 }
2524}
@@ -40,10 +39,9 @@ public class Spawner : MonoBehaviour
4039
4140 public void Spawn ()
4241 {
43- // Use this only with Prefabs
4442 _prefab .Spawn (transform .position , transform .rotation );
4543
46- // Use this only with Prefabs
44+ // Get object from pool with component
4745 _prefab .Spawn <Rigidbody >(transform .position , transform .rotation ).isKinematic = true ;
4846 }
4947}
@@ -61,7 +59,6 @@ public class Spawner : MonoBehaviour
6159
6260 public void Spawn ()
6361 {
64- // Use this only with Prefabs
6562 var instance = _prefab .Spawn (transform .position , transform .rotation );
6663
6764 // Use this only with Instances of Prefab
You can’t perform that action at this time.
0 commit comments