Skip to content

Commit e5f4f45

Browse files
committed
lazy ui code fixed
i forgot to redo the lazy ui code, now its fixed
1 parent 2de37eb commit e5f4f45

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

NewAPI/seyahdoo/pooling/Pool.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -376,23 +376,13 @@ void OnGUI()
376376
if (Selection.activeGameObject)
377377
{
378378
//i didnt like this code :(
379+
//i think i fixed the love issue here
379380
if (GUILayout.Button("Pool.Release(Selected)"))
380381
{
381-
List<GameObject> toLook = new List<GameObject>(Selection.gameObjects);
382-
List<GameObject> toDestroy = new List<GameObject>(Selection.gameObjects);
383-
384-
//foreach (GameObject go in toLook)
385-
//{
386-
// if (go.transform.parent)
387-
// {
388-
// if (toDestroy.Contains(go.transform.parent.gameObject))
389-
// {
390-
// toDestroy.Remove(go);
391-
// }
392-
// }
393-
//
394-
//}
395-
foreach (var item in toDestroy)
382+
383+
List<GameObject> toRelease = new List<GameObject>(Selection.gameObjects);
384+
385+
foreach (var item in toRelease)
396386
{
397387
item.Release();
398388
}

Packages/Pool v2.3.1.unitypackage

3.19 KB
Binary file not shown.

0 commit comments

Comments
 (0)