浏览代码

[FIX] fixes #123 Added a m_colorSpace variable to remember what the user had, and if they change we redraw the window.

/main
Martin Thorzen 7 年前
当前提交
e71bf6a6
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs


[NonSerialized]
public bool forceRedrawPreviews = false;
ColorSpace m_ColorSpace = PlayerSettings.colorSpace;
GraphEditorView m_GraphEditorView;
GraphEditorView graphEditorView

if (m_HasError)
return;
if (PlayerSettings.colorSpace != m_ColorSpace)
{
graphEditorView = null;
}
try
{
if (graphObject == null && selectedGuid != null)

{
var asset = AssetDatabase.LoadAssetAtPath<Object>(AssetDatabase.GUIDToAssetPath(selectedGuid));
graphEditorView = new GraphEditorView(this, materialGraph, asset.name) { persistenceKey = selectedGuid };
m_ColorSpace = PlayerSettings.colorSpace;
}
if (forceRedrawPreviews)

正在加载...
取消
保存