浏览代码

Merge pull request #276 from Unity-Technologies/fix-subgraph-name-start-with-number

[FIX] #272 This will prefix the generated code with "sg_"
/main
GitHub 7 年前
当前提交
e7b2f640
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs

2
com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs


private string SubGraphFunctionName()
{
var functionName = subGraphAsset != null ? NodeUtils.GetHLSLSafeName(subGraphAsset.name) : "ERROR";
return string.Format("{0}_{1}", functionName, GuidEncoder.Encode(referencedGraph.guid));
return string.Format("sg_{0}_{1}", functionName, GuidEncoder.Encode(referencedGraph.guid));
}
public virtual void GenerateNodeFunction(FunctionRegistry registry, GenerationMode generationMode)

正在加载...
取消
保存