浏览代码

Make reset reference menu appear only when reference name is overridden

/main
Jens Holm 7 年前
当前提交
1ba516e7
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 11
      com.unity.shadergraph/Editor/Data/Graphs/AbstractMaterialGraph.cs

11
com.unity.shadergraph/Editor/Data/Graphs/AbstractMaterialGraph.cs


return displayName;
}
public string SanitizePropertyReferenceName(string referenceName)
public string SanitizePropertyReferenceName(string referenceName, Guid guid = default(Guid))
if (string.IsNullOrEmpty(referenceName))
return null;
if (!referenceName.StartsWith("_"))
referenceName = "_" + referenceName;
// Similat to teh property names, duplicate names are handled by appending `_n`
// Similar to the property names, duplicate names are handled by appending `_n`
// to the end of the referene name.
if (m_Properties.Any(p => p.referenceName == referenceName && p.guid != guid))
{

正在加载...
取消
保存