浏览代码

Make PreviewProperty check a bit nicer and fix a warning

/main
Peter Bay Bastian 6 年前
当前提交
6db9deb9
共有 2 个文件被更改,包括 1 次插入2 次删除
  1. 2
      ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs
  2. 1
      ShaderGraph/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs

2
ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs


public void SetMaterialPropertyBlockValue(MaterialPropertyBlock block)
{
if (propType == PropertyType.Texture && textureValue != null || propType == PropertyType.Texture2DArray && textureValue != null || propType == PropertyType.Texture3D && textureValue != null)
if ((propType == PropertyType.Texture || propType == PropertyType.Texture2DArray || propType == PropertyType.Texture3D) && textureValue != null)
block.SetTexture(name, m_Data.textureValue);
else if (propType == PropertyType.Cubemap && cubemapValue != null)
block.SetTexture(name, m_Data.cubemapValue);

1
ShaderGraph/com.unity.shadergraph/Editor/Data/Util/GraphUtil.cs


using UnityEditor.Graphing.Util;
using UnityEngine;
using System.Reflection;
using System.Text.RegularExpressions;
namespace UnityEditor.ShaderGraph
{

正在加载...
取消
保存