浏览代码

Bug Fix for the Custom Code Node. Nodes will keep the code when reopened.

/main
bfogerty 8 年前
当前提交
331ea7b4
共有 3 个文件被更改,包括 14 次插入1 次删除
  1. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/CustomCodeNodePresenter.cs
  2. 1
      MaterialGraphProject/Assets/Code Graph.ShaderGraph
  3. 9
      MaterialGraphProject/Assets/Code Graph.ShaderGraph.meta

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/CustomCodeNodePresenter.cs


if (codeEditorPopup == null)
{
codeEditorPopup = new CodeEditorPopup(tNode);
tNode.Code = "//Write your function below.\r\nvoid test(float a, float b, out float c)\r\n{\r\n\tc = a + b;\r\n}\r\n";
if (string.IsNullOrEmpty(tNode.Code))
{
tNode.Code = "//Write your function below.\r\nvoid test(float a, float b, out float c)\r\n{\r\n\tc = a + b;\r\n}\r\n";
}
}
string buttonText = codeEditorPopup.IsOpen ? "Close Code Editor" : "Open Code Editor";

1
MaterialGraphProject/Assets/Code Graph.ShaderGraph
文件差异内容过多而无法显示
查看文件

9
MaterialGraphProject/Assets/Code Graph.ShaderGraph.meta


fileFormatVersion: 2
guid: 6e7da496d1011f54b8e707ce39eb4b5f
timeCreated: 1495644036
licenseType: Pro
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
正在加载...
取消
保存