public void DrawUnitysInspector() {
if( !Styles.initialized ) {
InitStyles();
}
Shader shader = this.target as Shader;
if (shader == null)
{
return;
}
GUI.enabled = true;
EditorGUI.indentLevel = 0;
this.ShowShaderCodeArea(shader);
if (shader.isSupported)
{
EditorGUILayout.LabelField("Cast shadows", (!(bool)sutilHasShadowCasterPass.Invoke(null, new object[]{shader})) ? "no" : "yes", new GUILayoutOption[0]);
EditorGUILayout.LabelField( "Render queue", ((int)sutilGetRenderQueue.Invoke( null, new object[] { shader } )).ToString( CultureInfo.InvariantCulture ), new GUILayoutOption[0] );
EditorGUILayout.LabelField( "LOD", ( (int)sutilGetLOD.Invoke( null, new object[] { shader } ) ).ToString( CultureInfo.InvariantCulture ), new GUILayoutOption[0] );
EditorGUILayout.LabelField( "Ignore projector", ( !(bool)sutilDoesIgnoreProjector.Invoke( null, new object[] { shader } ) ) ? "no" : "yes", new GUILayoutOption[0] );
string label;
switch( (int)shaderDisableBatching.GetValue( shader, null ) )
{
case 0:
label = "no";
break;
case 1:
label = "yes";
break;
case 2:
label = "when LOD fading is on";
break;
default:
label = "unknown";
break;
}
EditorGUILayout.LabelField("Disable batching", label, new GUILayoutOption[0]);
ShowShaderProperties(shader);
}
}
private void ShowShaderCodeArea(Shader s)