private void RenderSetPrefabOffsetFromObjectSurfaceInActiveCategoryButton() { if (GUILayout.Button(GetContentForSetPrefabOffsetFromObjectSurfaceInActiveCategoryButton(), GUILayout.Width(EditorGUILayoutEx.PreferedActionButtonWidth + 3.0f))) { PrefabCategory activePrefabCategory = PrefabCategoryDatabase.Get().ActivePrefabCategory; UndoEx.RecordForToolAction(activePrefabCategory.GetAllPrefabs()); PrefabCategoryActions.SetPrefabOffsetFromObjectSurface(activePrefabCategory, ViewData.PrefabOffsetFromObjectSurface); } }
private void RenderNextPrefabButton(float buttonWidth) { if (GUILayout.Button(GetContentForNextPrefabButton(), GUILayout.Width(buttonWidth))) { PrefabCategory activePrefabCategory = PrefabCategoryDatabase.Get().ActivePrefabCategory; UndoEx.RecordForToolAction(activePrefabCategory); PrefabCategoryActions.ActivateNextPrefabInPrefabCategory(activePrefabCategory); } }
private void EnsureActivePrefabPassesPrefabFilter() { List <Prefab> filteredPrefabs = GetFilteredPrefabs(); if (ActivePrefab != null && !filteredPrefabs.Contains(ActivePrefab)) { PrefabCategoryActions.ActivateNextPrefabInPrefabCategory(this); if (ActivePrefab == null) { PrefabCategoryActions.ActivatePreviousPrefabInPrefabCategory(this); } } }