public override void OnInspectorGUI()
{
Shader shader = base.target as Shader;
if (!(shader == null))
{
GUI.enabled = true;
EditorGUI.indentLevel = 0;
this.ShowShaderCodeArea(shader);
if (shader.isSupported)
{
EditorGUILayout.LabelField("Cast shadows", (!ShaderUtil.HasShadowCasterPass(shader)) ? "no" : "yes", new GUILayoutOption[0]);
EditorGUILayout.LabelField("Render queue", ShaderUtil.GetRenderQueue(shader).ToString(CultureInfo.InvariantCulture), new GUILayoutOption[0]);
EditorGUILayout.LabelField("LOD", ShaderUtil.GetLOD(shader).ToString(CultureInfo.InvariantCulture), new GUILayoutOption[0]);
EditorGUILayout.LabelField("Ignore projector", (!ShaderUtil.DoesIgnoreProjector(shader)) ? "no" : "yes", new GUILayoutOption[0]);
string label;
switch (shader.disableBatching)
{
case DisableBatchingType.False:
label = "no";
break;
case DisableBatchingType.True:
label = "yes";
break;
case DisableBatchingType.WhenLODFading:
label = "when LOD fading is on";
break;
default:
label = "unknown";
break;
}
EditorGUILayout.LabelField("Disable batching", label, new GUILayoutOption[0]);
ShaderInspector.ShowShaderProperties(shader);
}
}
}