Updated PropertyDrawer;

Updated MaterialUIScope;
This commit is contained in:
2025-03-30 12:24:36 +09:00
parent b12794270f
commit 86f0bf639c
3 changed files with 19 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using UnityEditor;
using UnityEditor.Rendering;
@@ -12,6 +13,7 @@ namespace Misaki.ShaderGUI
protected MaterialEditor editor;
protected IEnumerable<MaterialProperty> materialProperties;
protected IMaterialUIScopeContainer owner;
protected ReadOnlyCollection<Material> materials;
protected virtual bool ShowSection => true;
protected virtual bool IsSubHeader => false;
@@ -39,6 +41,7 @@ namespace Misaki.ShaderGUI
editor = materialEditor;
materialProperties = properties;
owner = container;
materials = editor.GetMaterials().ToList().AsReadOnly();
UpdateMaterialProperties(properties);
}