Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/wolf-org/object-pooling-unity
- Owner: wolf-org
- License: mit
- Created: 2024-06-27T10:20:41.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-27T09:24:39.000Z (3 months ago)
- Last Synced: 2024-08-28T09:43:20.553Z (3 months ago)
- Topics: object-pool, object-pooling, unity, unity3d
- Language: C#
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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();
}```