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);
     }
 }
Example #2
0
        private void RenderNextPrefabButton(float buttonWidth)
        {
            if (GUILayout.Button(GetContentForNextPrefabButton(), GUILayout.Width(buttonWidth)))
            {
                PrefabCategory activePrefabCategory = PrefabCategoryDatabase.Get().ActivePrefabCategory;

                UndoEx.RecordForToolAction(activePrefabCategory);
                PrefabCategoryActions.ActivateNextPrefabInPrefabCategory(activePrefabCategory);
            }
        }
Example #3
0
        private void EnsureActivePrefabPassesPrefabFilter()
        {
            List <Prefab> filteredPrefabs = GetFilteredPrefabs();

            if (ActivePrefab != null && !filteredPrefabs.Contains(ActivePrefab))
            {
                PrefabCategoryActions.ActivateNextPrefabInPrefabCategory(this);
                if (ActivePrefab == null)
                {
                    PrefabCategoryActions.ActivatePreviousPrefabInPrefabCategory(this);
                }
            }
        }