浏览代码

[Material Graph]fix issue with pixel shader UI

/main
Tim Cooper 8 年前
当前提交
e7cb2abf
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/NodeDrawers/PixelShaderNodeUI.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/NodeDrawers/PixelShaderNodeUI.cs


return base.Render(area);
var lightFunctions = PixelShaderNode.GetLightFunctions();
var lightFunction = localNode.lightFunction;
var lightFunction = localNode.lightFunction.GetType();
lightFuncIndex = lightFunctions.IndexOf(lightFunction);
lightFuncIndex = lightFunctions.Select(x => x.GetType()).ToList().IndexOf(lightFunction);
EditorGUI.BeginChangeCheck();
lightFuncIndex = EditorGUI.Popup(new Rect(area.x, area.y, area.width, EditorGUIUtility.singleLineHeight), lightFuncIndex, lightFunctions.Select(x => x.lightFunctionName).ToArray(), EditorStyles.popup);

正在加载...
取消
保存