File size: 868 Bytes
d883ffe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | using UnityEngine;
namespace UnityEditor
{
// Used for ShaderGraph Sprite shaders
class ShaderGraphSpriteGUI : BaseShaderGUI
{
protected override uint materialFilter => uint.MaxValue & ~(uint)Expandable.SurfaceOptions;
MaterialProperty[] properties;
// collect properties from the material properties
public override void FindProperties(MaterialProperty[] properties)
{
// save off the list of all properties for shadergraph
this.properties = properties;
var material = materialEditor?.target as Material;
if (material == null)
return;
base.FindProperties(properties);
}
public override void DrawSurfaceInputs(Material material)
{
DrawShaderGraphProperties(material, properties);
}
}
}
|