浏览代码

Fix implicit conversion check for non dynamic casts

/main
Matt Dean 7 年前
当前提交
e9026c65
共有 1 个文件被更改,包括 3 次插入11 次删除
  1. 14
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/AbstractMaterialNode.cs

14
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/AbstractMaterialNode.cs


var fromCount = SlotValueHelper.GetChannelCount(from);
var toCount = SlotValueHelper.GetChannelCount(to);
// can convert from v1 vectors :)
if (from == ConcreteSlotValueType.Vector1 && toCount > 0)
return true;
if (toCount == 0)
return false;
if (toCount <= fromCount)
if (toCount > 0 && fromCount > 0)
return false;
}

正在加载...
取消
保存