#if UNITY_EDITOR using UnityEditor; using UnityEngine; using UnityEngine.UIElements; using UnityEditor.UIElements; using System.Collections.Generic; namespace Bitd { public struct stMatcapInfo { public bool _UseMatCap; public Texture _MatCapTex; public Color _MatCapColor; public Texture _MatCapBlendMask; public int _MatCapBlendMode; public stMatcapInfo(bool _useMatCap) { _UseMatCap = _useMatCap; _MatCapTex = null; _MatCapColor = Color.white; _MatCapBlendMask = null; _MatCapBlendMode = 0; } public stMatcapInfo(bool _useMatCap, Texture _matCapTex, Color _matCapColor, Texture _matCapBlendMask, int _matCapBlendMode) { _UseMatCap = _useMatCap; _MatCapTex = _matCapTex; _MatCapColor = _matCapColor; _MatCapBlendMask = _matCapBlendMask; _MatCapBlendMode = _matCapBlendMode; } } public class NiloMaterialMatcapSetter : EditorWindow { private const string CommonUssPath = "Assets/Scripts/Streamingle/StreamingleControl/Editor/UXML/StreamingleCommon.uss"; private const string targetShaderName = "lilToon"; private List materials = new List(); private string pEnableName_Front = "_BaseMapStackingLayer"; private string pEnableName_Back = "Enable"; private VisualElement materialListContainer; private VisualElement dropArea; [MenuItem("Tools/Utilities/닐로툰 매트캡 자동 인식기")] public static void ShowWindow() { GetWindow("닐로툰 매트캡 자동 인식기"); } 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