public static GUIContent defaults = new GUIContent ( "Defaults" ) ;
public static GUIContent linearRenderingLabel = new GUIContent ( "Force Linear Colorspace" , "When enabled Lightweight shader will perform gamma to linear conversion in the shader when linear rendering is not supported or disabled" ) ;
public static GUIContent renderScaleLabel = new GUIContent ( "Render Scale" , "Allows game to render at a resolution different than native resolution. UI is always rendered at native resolution." ) ;
public static GUIContent maxPixelLights = new GUIContent ( "Per-Object Pixel Lights" ,
"Max amount of dynamic per-object pixel lights." ) ;
public static GUIContent enableLightmap = new GUIContent ( "Enable Lightmap" ,
"Enabled/Disable support for non-directional lightmaps." ) ;
public static GUIContent enableAmbientProbe = new GUIContent ( "Enable Light Probes" ,
"Enables/Disable light probe support." ) ;
public static GUIContent shadowType = new GUIContent ( "Shadow Type" ,
"Single directional shadow supported. SOFT_SHADOWS applies shadow filtering." ) ;
}
private SerializedProperty m_LinearRenderingProperty ;
private SerializedProperty m_RenderScale ;
private SerializedProperty m_MaxPixelLights ;
private SerializedProperty m_SupportsVertexLightProp ;
private SerializedProperty m_ShadowTypeProp ;
void OnEnable ( )
{
m_LinearRenderingProperty = serializedObject . FindProperty ( "m_LinearRendering" ) ;
m_RenderScale = serializedObject . FindProperty ( "m_RenderScale" ) ;
m_MaxPixelLights = serializedObject . FindProperty ( "m_MaxPixelLights" ) ;
m_SupportsVertexLightProp = serializedObject . FindProperty ( "m_SupportsVertexLight" ) ;
m_ShadowTypeProp = serializedObject . FindProperty ( "m_ShadowType" ) ;
EditorGUILayout . LabelField ( Styles . renderingLabel , EditorStyles . boldLabel ) ;
EditorGUI . indentLevel + + ;
EditorGUILayout . PropertyField ( m_LinearRenderingProperty , Styles . linearRenderingLabel ) ;
EditorGUILayout . BeginHorizontal ( ) ;
EditorGUILayout . LabelField ( Styles . renderScaleLabel ) ;
m_RenderScale . floatValue = EditorGUILayout . Slider ( m_RenderScale . floatValue , 0.1f , 1.0f ) ;
EditorGUILayout . EndHorizontal ( ) ;
EditorGUILayout . BeginHorizontal ( ) ;
EditorGUILayout . LabelField ( Styles . maxPixelLights ) ;
m_MaxPixelLights . intValue = EditorGUILayout . IntSlider ( m_MaxPixelLights . intValue , 0 , 4 ) ;