浏览代码

Merge pull request #247 from keijiro/fix-null-preview

Fix for NullReferenceException in master preview.
/main
GitHub 7 年前
当前提交
f7374d45
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/MasterPreviewView.cs
  2. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/MasterPreviewView.cs


IMasterNode masterNode
{
get { return m_PreviewRenderHandle.shaderData.node as IMasterNode; }
get { return m_PreviewRenderHandle.shaderData != null ? m_PreviewRenderHandle.shaderData.node as IMasterNode : null; }
}
void DirtyMasterNode(ModificationScope scope)

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs


public void ResizeMasterPreview(Vector2 newSize)
{
m_NewMasterPreviewSize = newSize;
m_DirtyPreviews.Add(masterRenderData.shaderData.node.tempId.index);
if (masterRenderData.shaderData != null)
m_DirtyPreviews.Add(masterRenderData.shaderData.node.tempId.index);
}
public PreviewRenderData GetPreview(AbstractMaterialNode node)

正在加载...
取消
保存