UniPool - Advanced Universal Prefab Pooling
DBCreative
$0.0
(no ratings)
Date |
Price |
---|---|
Date |
Price($) |
08/14(2024) |
0.0 |
11/23(2024) |
0.0 |
Jump AssetStore
Blazingly fast, and simple to use, advanced prefab pooling solution.UniPool - Advanced Universal Prefab Poolingprovides a way to pool all kinds of prefabs into a single universal pool.This allows to pool prefabs without dependencies, with a natural workflow, similar to Instantiate and Destroy.Optimizations:UniPool uses PoolCell object to cache GameObject, TransformIn addition, you may specify one Component type, located on prefab or in children, to be cached as well (including interface type).This is so you can avoid unnecessary (costly at scale) calls to .GetComponent; .gameObject; transform;Use features:Get - get object from pool,with or without prior registration (can be fully dynamic)Registration - may choose to register a prefab before use (by prefab or string name)Fill - can instantiate an amount of prefabs to poolRelease - releases object back to pool. Release can be done by passing a reference, any of: PoolCell, GameObject, Transform, Component.UGUI object pooling - Pooling works for regular 3D objects and UI objects alike.Custom container - can specify what object to use as a pool container for each particular prefabExample code:PoolCell cell = UniPool.Get(prefab);PoolCell cell = UniPool.Get("registeredName");PoolCell cell = UniPool.Get(prefab);cell.gameObject; // cached gameObjectcell.transform; // cached transformcell.GetComponent(); // retrieves cached component reference// Plain prefab.UniPool.Register(prefab);// Prefab with component caching of specified type T// attach string name, that can be used to Get("prefab") via string nameUniPool.Register(prefab, "prefab");// Release by passing any of: PoolCell, Transform, GameObject, ComponentUniPool.Release(transform);UniPool - Advanced Universal Prefab Poolingprovides a way to pool all kinds of prefabs into a single universal pool.This allows to pool prefabs without dependancies, with a natural workflow, similar to Instantiate and Destroy.Optimizations:UniPool uses PoolCell object to cache GameObject, TransformIn addition, you may specify one Component type, located on prefab or in children, to be cached as well (including interface type).This is so you can avoid unnecessary (costly at scale) calls to .GetComponent; .gameObject; transform;Use features:Get - get object from poolwith or without prior registration (can be fully dynamic).Registration - may choose to register a prefab before use (by prefab or string name).Fill - can instantiate an amount of prefabs to pool.Release - releases object back to pool. Release can be done by passing a reference of: PoolCell, GameObject, Transform, Component.