public static void CloseAllWindows() { WindowPending[] pendingArray = Resources.FindObjectsOfTypeAll(typeof(WindowPending)) as WindowPending[]; WindowPending pending = (pendingArray.Length <= 0) ? null : pendingArray[0]; if (pending != null) { pending.Close(); } }
public static void CloseAllWindows() { var wins = Resources.FindObjectsOfTypeAll(typeof(WindowPending)) as WindowPending[]; WindowPending win = wins.Length > 0 ? wins[0] : null; if (win != null) { win.Close(); } }
public static void CloseAllWindows() { WindowPending[] objectsOfTypeAll = Resources.FindObjectsOfTypeAll(typeof(WindowPending)) as WindowPending[]; WindowPending windowPending = objectsOfTypeAll.Length <= 0 ? (WindowPending)null : objectsOfTypeAll[0]; if (!((UnityEngine.Object)windowPending != (UnityEngine.Object)null)) { return; } windowPending.Close(); }