Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wolf-org/object-pooling-unity

Object Pooling for Unity - Easy to use
https://github.com/wolf-org/object-pooling-unity

object-pool object-pooling unity unity3d

Last synced: about 22 hours ago
JSON representation

Object Pooling for Unity - Easy to use

Awesome Lists containing this project

README

        



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`
```csharp
"com.wolf-org.object-pooling":"https://github.com/wolf-org/object-pooling-unity.git#1.0.1",
```
## Use

- Init Pool

```csharp
Pool.InitPool();
```

- Spawn/DeSpawn Object

```csharp

public GameObject prefab;

private GameObject ins;

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

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

```

Or

```csharp

public GameObject prefab;

private GameObject ins;

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

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

```