Skip to content

Object Pooling for Unity - Easy to use

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

unity-package/object-pooling-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Made With Unity License Last Commit Repo Size Last Release

What

  • Object-Pooling for game unity is very easy to use

How To Install

Add the line below to Packages/manifest.json

for version 1.0.1

"com.wolf-org.object-pooling":"https://github.com/unity-package/object-pooling-unity.git#1.0.1",

Use

  • Init Pool
    Pool.InitPool();
  • Spawn/DeSpawn Object
    public GameObject prefab;

    private GameObject ins;

    void SpawnIns()
    {
        ins = Pool.Spawn(prefab);
    }

    void DeSpawnIns()
    {
        Pool.DeSpawn(ins);
    }

Or

    public GameObject prefab;

    private GameObject ins;

    void SpawnIns()
    {
        ins = prefab.Spawn();
    }

    void DeSpawnIns()
    {
        ins.DeSpawn();
    }