File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments