|
|
|
|
|
|
|
|
|
|
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(); |
|
|
|
{ |
|
|
|