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

wolf-package/object-pooling-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 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.0

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

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();
    }