浏览代码

Merge pull request #431 from Unity-Technologies/Branch_SmallLayerFix

- Added color to Material reference labels for LayeredLit Shader
/stochastic_alpha_test
GitHub 7 年前
当前提交
10e0fdad
共有 1 个文件被更改,包括 19 次插入5 次删除
  1. 24
      ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/Editor/LayeredLitUI.cs

24
ScriptableRenderPipeline/HDRenderPipeline/Material/LayeredLit/Editor/LayeredLitUI.cs


private class StylesLayer
{
public readonly Color[] layerColors =
{
Color.white,
Color.red,
Color.green,
Color.blue
};
public readonly GUIContent[] layerLabels =
{
new GUIContent("Main layer"),

public StylesLayer()
{
layerLabelColors[0].normal.textColor = Color.white;
layerLabelColors[1].normal.textColor = Color.red;
layerLabelColors[2].normal.textColor = Color.green;
layerLabelColors[3].normal.textColor = Color.blue;
layerLabelColors[0].normal.textColor = layerColors[0];
layerLabelColors[1].normal.textColor = layerColors[1];
layerLabelColors[2].normal.textColor = layerColors[2];
layerLabelColors[3].normal.textColor = layerColors[3];
}
}

bool layersChanged = false;
Material material = m_MaterialEditor.target as Material;
Color originalContentColor = GUI.contentColor;
GUI.contentColor = styles.layerColors[layerIndex];
SynchronizeLayerProperties(material, m_MaterialLayers, layerIndex, false);
SynchronizeLayerProperties(material, m_MaterialLayers, layerIndex, true);
GUI.contentColor = originalContentColor;
GUILayout.BeginHorizontal();
{

正在加载...
取消
保存