using UnityEngine; using UnityEditor; using UnityEngine.UIElements; using UnityEditor.UIElements; using System.Collections.Generic; using System.IO; public class MaterialAndTextureTool : EditorWindow { private const string CommonUssPath = "Assets/Scripts/Streamingle/StreamingleControl/Editor/UXML/StreamingleCommon.uss"; private ObjectField prefabField; private TextField materialPathField; private TextField texturePathField; private VisualElement resultContainer; private GameObject targetPrefab; private Dictionary> duplicateMaterialMap = new Dictionary>(); private Dictionary> duplicateTextureMap = new Dictionary>(); private Dictionary materialCopies = new Dictionary(); private Dictionary textureCopies = new Dictionary(); private HashSet collectedMaterials = new HashSet(); private HashSet collectedTextures = new HashSet(); [MenuItem("Tools/Utilities/머티리얼 & 텍스처 도구")] public static void ShowWindow() { var window = GetWindow("머티리얼 & 텍스처 도구"); window.minSize = new Vector2(600, 500); } public void CreateGUI() { var root = rootVisualElement; root.AddToClassList("tool-root"); var commonUss = AssetDatabase.LoadAssetAtPath(CommonUssPath); if (commonUss != null) root.styleSheets.Add(commonUss); root.Add(new Label("머티리얼 & 텍스처 유틸리티") { name = "title" }); root.Q