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