在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:densylkin/QuickPool开源软件地址:https://github.com/densylkin/QuickPool开源编程语言:C# 100.0%开源软件介绍:Unity-QuickPoolAsset store UsageYou can use quickpool in two ways:
Include QuickPool namespace using QuickPool; You can use extention methods var instance = somePrefab.Spawn(Vector3.zero, Quaternion.identity);
var component = somePrefab.Spawn<Component>(Vector3.zero, Quaternion.identity);
obj.Despawn(); You also can get concrete pool from PoolManager or use that one you have created public Pool pool = new Pool()
{
size = 100,
allowGrowth = true
};
// OR
var pool = PoolManager.Instance["pool name"]; private void Start()
{
PoolsManager.RegisterPool(pool); //register pool if you want to use extention method Despawn
pool.Initialize();
var instance = pool.Spawn(Vector3.zero, Quaternion.identity);
var conponent = pool.Spawn<Component>(Vector3.zero, Quaternion.identity);
pool.Despawn(instance);
} Despawn all spawned objects PoolsManager.DespawnAll();
// OR
pool.DespawnAll(); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论