using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; using Object = UnityEngine.Object; namespace BITKit { public class MaterialPaletteWindow : EditorWindow { [MenuItem("Tools/Scenes/Material Palette")] public static void Open() { GetWindow().Show(); } private Button buildButton; private Label _titleLabel; private VisualElement _container; private MeshRenderer[] _renderers=Array.Empty(); private void OnEnable() { UnityEditor.Selection.selectionChanged += OnSelectionChanged; rootVisualElement.Clear(); _titleLabel = rootVisualElement.Create