@@ -11,8 +11,20 @@ internal class UISoftMaskProjectSettingsEditor : Editor
1111
1212 public override void OnInspectorGUI ( )
1313 {
14+ serializedObject . Update ( ) ;
1415 EditorGUIUtility . labelWidth = 180 ;
15- base . OnInspectorGUI ( ) ;
16+
17+ // Setting
18+ EditorGUILayout . LabelField ( "Setting" , EditorStyles . boldLabel ) ;
19+ EditorGUILayout . PropertyField ( serializedObject . FindProperty ( "m_SoftMaskEnabled" ) ) ;
20+ EditorGUILayout . PropertyField ( serializedObject . FindProperty ( "m_StereoEnabled" ) ) ;
21+ EditorGUILayout . PropertyField ( serializedObject . FindProperty ( "m_TransformSensitivity" ) ) ;
22+ EditorGUILayout . PropertyField ( serializedObject . FindProperty ( "m_SoftMaskable" ) ) ;
23+
24+ // Editor
25+ EditorGUILayout . Space ( ) ;
26+ EditorGUILayout . LabelField ( "Editor" , EditorStyles . boldLabel ) ;
27+ EditorGUILayout . PropertyField ( serializedObject . FindProperty ( "m_HideGeneratedComponents" ) ) ;
1628
1729 // Shader registry.
1830 EditorGUILayout . Space ( ) ;
@@ -30,9 +42,32 @@ public override void OnInspectorGUI()
3042
3143 _shaderVariantRegistryEditor . Draw ( ) ;
3244
45+ // Advanced
3346 EditorGUILayout . Space ( ) ;
3447 EditorGUILayout . LabelField ( "Advanced" , EditorStyles . boldLabel ) ;
35- EditorGUILayout . PropertyField ( serializedObject . FindProperty ( "m_ExcludeFromPreloadedAssets" ) ) ;
48+ var excludeProp = serializedObject . FindProperty ( "m_ExcludeFromPreloadedAssets" ) ;
49+ EditorGUILayout . PropertyField ( excludeProp ) ;
50+
51+ if ( excludeProp . boolValue )
52+ {
53+ var shadersProp = serializedObject . FindProperty ( "m_ShaderVariantRegistry" )
54+ . FindPropertyRelative ( "m_RegisteredShaders" ) ;
55+ EditorGUI . BeginDisabledGroup ( true ) ;
56+ EditorGUI . indentLevel ++ ;
57+ for ( var i = 0 ; i < shadersProp . arraySize ; i ++ )
58+ {
59+ EditorGUILayout . PropertyField ( shadersProp . GetArrayElementAtIndex ( i ) , GUIContent . none ) ;
60+ }
61+ EditorGUI . indentLevel -- ;
62+ EditorGUI . EndDisabledGroup ( ) ;
63+
64+ if ( shadersProp . arraySize == 0 )
65+ {
66+ EditorGUILayout . HelpBox (
67+ "No shaders registered. Re-import or modify the settings asset to trigger sync." ,
68+ MessageType . Warning ) ;
69+ }
70+ }
3671
3772 serializedObject . ApplyModifiedProperties ( ) ;
3873
0 commit comments