public static void OpenIfCheckoutFailed(AssetList assets) { Object[] objectsOfTypeAll = Resources.FindObjectsOfTypeAll(typeof(WindowCheckoutFailure)); bool alreadyOpen = (objectsOfTypeAll.Length <= 0 ? (Object)null : (Object)(objectsOfTypeAll[0] as WindowCheckoutFailure)) != (Object)null; bool flag = alreadyOpen; if (!flag) { using (List <Asset> .Enumerator enumerator = assets.GetEnumerator()) { while (enumerator.MoveNext()) { if (!enumerator.Current.IsState(Asset.States.CheckedOutLocal)) { flag = true; break; } } } } if (!flag) { return; } WindowCheckoutFailure.GetWindow().DoOpen(assets, alreadyOpen); }
public static void OpenIfCheckoutFailed(AssetList assets) { UnityEngine.Object[] array = Resources.FindObjectsOfTypeAll(typeof(WindowCheckoutFailure)); WindowCheckoutFailure x = (array.Length <= 0) ? null : (array[0] as WindowCheckoutFailure); bool flag = x != null; bool flag2 = flag; if (!flag2) { foreach (Asset current in assets) { if (!current.IsState(Asset.States.CheckedOutLocal)) { flag2 = true; break; } } } if (flag2) { WindowCheckoutFailure.GetWindow().DoOpen(assets, flag); } }