Initial upload
This commit is contained in:
29
Editor/Models/MaterialPropertyInfo.cs
Normal file
29
Editor/Models/MaterialPropertyInfo.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Misaki.ShaderGUI
|
||||
{
|
||||
public class MaterialPropertyInfo
|
||||
{
|
||||
private MaterialProperty _property;
|
||||
|
||||
public readonly string propertyName;
|
||||
public readonly GUIContent label;
|
||||
|
||||
public MaterialProperty Property => _property;
|
||||
|
||||
public MaterialPropertyInfo(string propName, GUIContent content)
|
||||
{
|
||||
propertyName = propName;
|
||||
label = content;
|
||||
_property = null;
|
||||
}
|
||||
|
||||
public void ReloadProperty(IEnumerable<MaterialProperty> properties)
|
||||
{
|
||||
_property = properties.First(p => p.name == propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user