This commit is contained in:
CortexCore
2025-08-03 02:28:50 +08:00
parent ecae0f809c
commit c3f0a8e840
8 changed files with 114 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ namespace BITKit.Pool
{
if (obj is not Component component) continue;
if (!hashset.Add(component.gameObject)) continue;
if (component.gameObject)
if (component)
Object.Destroy(component.gameObject);
}
}
@@ -87,6 +87,9 @@ namespace BITKit.Pool
if (asset is Object o)
{
var instance = Object.Instantiate(o);
instance.name = path;
list.Add(instance);
UsingPool.GetOrCreate(path).Add(instance);
ReadyPool.GetOrCreate(path);