public static bool ShrunkListIfNeeded() { bool hasChanged = false; if (SelectedObjectsCount >= UnityEssentialsPreferences.GetMaxSelectedObjectStored()) { hasChanged = true; SelectedObjectsList.RemoveAt(0); } while (SelectedObjectsWithoutDuplicateCount >= UnityEssentialsPreferences.GetMaxObjectSHown()) { hasChanged = true; SelectedObjectsWithoutDuplicateList.RemoveAt(0); } while (PinnedObjectsCount >= UnityEssentialsPreferences.GetMaxPinnedObject()) { hasChanged = true; PinnedObjectsList.RemoveAt(0); } while (PinnedObjectsInScenesCount >= UnityEssentialsPreferences.GetMaxPinnedObject()) { hasChanged = true; PinnedObjectsInScenesList.RemoveAt(0); PinnedObjectsNameInScenesList.RemoveAt(0); PinnedObjectsScenesLinkList.RemoveAt(0); } return(hasChanged); }
public static void RemoveAssetFromBookMark(int index) { SelectedObjectsWithoutDuplicateList.AddObject(PinnedObjectsIndex(index)); PinnedObjectsList.RemoveAt(index); Save(); }
public static void ClearSelectedList() { if (SelectedObjectsWithoutDuplicateList.ContainsObject(LastSelectedObject)) { PeekSerializeObject.ChangeLastSelectedObject(null); } SelectedObjectsWithoutDuplicateList.ClearArray(); Save(); }
public static void MoveToBookMark(int index) { SelectedObjectsWithoutDuplicateList.AddObject(PinnedObjectsInScenesIndex(index)); PinnedObjectsScenesLinkList.RemoveAt(index); PinnedObjectsInScenesList.RemoveAt(index); PinnedObjectsNameInScenesList.RemoveAt(index); Save(30); }
public static void RemoveItemInSelection(int index) { if (LastSelectedObject == SelectedObjectsWithoutDuplicateIndex(index)) { ChangeLastSelectedObject(null); } SelectedObjectsList.RemoveAllObject(SelectedObjectsWithoutDuplicateIndex(index)); SelectedObjectsWithoutDuplicateList.RemoveAt(index); Save(); }
public static void RemoveBookMarkedItem(int index) { if (LastSelectedObject == PinnedObjectsInScenesIndex(index)) { PeekSerializeObject.ChangeLastSelectedObject(null); } SelectedObjectsList.RemoveAllObject(PinnedObjectsIndex(index)); SelectedObjectsWithoutDuplicateList.RemoveObject(PinnedObjectsIndex(index)); PinnedObjectsList.RemoveAt(index); Save(); }
public static void Reset() { ChangeLastSelectedObject(null); SetCurrentIndex(-1); SelectedObjectsList.ClearArray(); SelectedObjectsWithoutDuplicateList.ClearArray(); PinnedObjectsList.ClearArray(); PinnedObjectsInScenesList.ClearArray(); PinnedObjectsNameInScenesList.ClearArray(); PinnedObjectsScenesLinkList.ClearArray(); Save(); }
public static bool AddNewSelection(UnityEngine.Object currentSelectedObject) { if (currentSelectedObject == null) { return(false); } if (currentSelectedObject.GetType().ToString() == "Search.Pro.InspectorRecentSO") { return(false); } ChangeLastSelectedObject(currentSelectedObject); SelectedObjectsList.AddObject(LastSelectedObject); SetCurrentIndex(SelectedObjectsCount - 1); SelectedObjectsWithoutDuplicateList.RemoveObject(currentSelectedObject); if (!PinnedObjectsList.ContainsObject(currentSelectedObject) && !PinnedObjectsInScenesList.ContainsObject(currentSelectedObject)) { SelectedObjectsWithoutDuplicateList.AddObject(currentSelectedObject); } ShrunkListIfNeeded(); return(true); }
public static UnityEngine.Object SelectedObjectsWithoutDuplicateIndex(int index) { return(SelectedObjectsWithoutDuplicateList.GetArrayElementAtIndex(index).GetCustomObject()); }
public static void RemoveSelectedWithoutDuplicateAt(int index) { SelectedObjectsWithoutDuplicateList.RemoveAt(index); }
public static void RemoveSelectedWithoutDuplicate(UnityEngine.Object toRemove) { SelectedObjectsWithoutDuplicateList.RemoveObject(toRemove); }