浏览代码

Merge pull request #179 from Unity-Technologies/fix-preview-after-color-space-switch

[FIX] fixes #123 Added a m_colorSpace variable to remember what the u…
/main
GitHub 7 年前
当前提交
1a06a11e
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphEditWindow.cs

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


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

if (m_HasError)
return;
if (PlayerSettings.colorSpace != m_ColorSpace)
{
graphEditorView = null;
m_ColorSpace = PlayerSettings.colorSpace;
}
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)

正在加载...
取消
保存