using System.Collections.Generic; using UnityEditor; namespace Misaki.ShaderGUI { public class MaterialPropertyContainer : IMaterialPropertyContainer { private readonly Dictionary _properties = new(); public void AddProperty(MaterialPropertyInfo propertyInfo) { _properties.Add(propertyInfo.propertyName, propertyInfo); } public MaterialProperty GetProperty(string propertyName) { return _properties[propertyName].Property; } public void ReloadProperties(IEnumerable properties) { foreach (var property in _properties.Values) { property.ReloadProperty(properties); } } } }