浏览代码

Fix slot value type

/main
Matt Dean 7 年前
当前提交
a8be8e67
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/CodeFunctionNode.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/CodeFunctionNode.cs


}
if (t == typeof(ColorRGB))
{
return SlotValueType.Vector4;
return SlotValueType.Vector3;
}
if (t == typeof(Texture2D))
{

else if (attribute.binding == Binding.None && !par.IsOut && par.ParameterType == typeof(ColorRGBA))
s = new ColorRGBAMaterialSlot(attribute.slotId, par.Name, par.Name, SlotType.Input, attribute.defaultValue ?? Vector4.zero, hidden: attribute.hidden);
else if (attribute.binding == Binding.None && !par.IsOut && par.ParameterType == typeof(ColorRGB))
s = new ColorRGBMaterialSlot(attribute.slotId, par.Name, par.Name, SlotType.Input, attribute.defaultValue ?? Vector3.zero, hidden: attribute.hidden);
s = new ColorRGBMaterialSlot(attribute.slotId, par.Name, par.Name, SlotType.Input, attribute.defaultValue ?? Vector4.zero, hidden: attribute.hidden);
else if (attribute.binding == Binding.None || par.IsOut)
s = MaterialSlot.CreateMaterialSlot(
ConvertTypeToSlotValueType(par),

正在加载...
取消
保存