浏览代码

Merge pull request #202 from Unity-Technologies/peter-fixes

Various fixes
/main
GitHub 7 年前
当前提交
92a10806
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/UVMaterialSlot.cs
  2. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/UVMaterialSlot.cs


[Serializable]
public class UVMaterialSlot : Vector2MaterialSlot, IMayRequireMeshUV
{
private UVChannel m_Channel = UVChannel.UV0;
[SerializeField]
UVChannel m_Channel = UVChannel.UV0;
public UVChannel channel
{

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


PropagateNodeSet(m_DirtyPreviews);
m_NodesWith3DPreview.Clear();
foreach (var index in m_DirtyPreviews)
foreach (var node in m_Graph.GetNodes<AbstractMaterialNode>())
var node = (AbstractMaterialNode)m_Graph.GetNodeFromTempId(m_Identifiers[index]);
if (node.previewMode == PreviewMode.Preview3D)
m_NodesWith3DPreview.Add(node.tempId.index);
}

void DestroyRenderData(PreviewRenderData renderData)
{
if (renderData.shaderData != null
&& renderData.shaderData.shader != null
&& renderData.shaderData.shader != null
if (renderData.shaderData != null && renderData.shaderData.node != null)
renderData.shaderData.node.onModified -= OnNodeModified;
}

正在加载...
取消
保存