Browse Source

Update to mass replace to filter to selection

Josh_Dev_branch
JoshuaReason 5 years ago
parent
commit
446b37e9f5
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      Assets/Editor/MassReplacer.cs

+ 11
- 2
Assets/Editor/MassReplacer.cs View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System;
using System.Linq;
/// <summary>
/// Editor Class used to search and replace objects with prefabs;
@ -49,6 +50,11 @@ public class MassReplacer : EditorWindow {
//Advanced Settings
GUIStyle BoldFold = new GUIStyle(EditorStyles.foldout); BoldFold.font = EditorStyles.boldFont; //create foldoutstyle with bold text
showAdvancedSettings = EditorGUILayout.Foldout(showAdvancedSettings, "Advanced Settings", BoldFold);
if (showAdvancedSettings) {
doCopyScale = EditorGUILayout.Toggle("Copy Scale", doCopyScale);
@ -86,8 +92,11 @@ public class MassReplacer : EditorWindow {
replaceFiltedList();
}
GUI.enabled = true;
if (GUILayout.Button("Cancel")) {
if (GUILayout.Button("Filter To Selected")) {
foreach(ListItem item in FilteredList)
{
item.isRepplaceable = Selection.gameObjects.Contains(item.gameObject);
}
}
GUILayout.EndHorizontal(); // end buttons

Loading…
Cancel
Save