|
|
@ -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
|
|
|
|
|
|
|
|