@@ -15,10 +15,17 @@ namespace GameFrameX.Advertisement.Editor
1515 [ CustomEditor ( typeof ( AdvertisementComponent ) ) ]
1616 internal sealed class AdvertisementComponentInspector : ComponentTypeComponentInspector
1717 {
18- private SerializedProperty m_adUnitId = null ;
19- private GUIContent m_adUnitIdGUIContent = new GUIContent ( "广告位ID" ) ;
18+ private SerializedProperty m_adUnitIdAndroid = null ;
19+ private SerializedProperty m_adUnitIdiOS = null ;
20+ private SerializedProperty m_adUnitIdWebGL = null ;
21+ private SerializedProperty m_adUnitIdWebGLWeChat = null ;
22+ private SerializedProperty m_adUnitIdWebGLDouYin = null ;
23+ private GUIContent m_adUnitIdAndroidGUIContent = new GUIContent ( "Android 广告位ID" ) ;
24+ private GUIContent m_adUnitIdiOSGUIContent = new GUIContent ( "IOS 广告位ID" ) ;
25+ private GUIContent m_adUnitIdWebGLGUIContent = new GUIContent ( "WebGL 广告位ID" ) ;
26+ private GUIContent m_adUnitIdWebGLWeChatGUIContent = new GUIContent ( "WebGL 微信 广告位ID" ) ;
27+ private GUIContent m_adUnitIdWebGLDouYinGUIContent = new GUIContent ( "WebGL 抖音 广告位ID" ) ;
2028
21-
2229 public override void OnInspectorGUI ( )
2330 {
2431 base . OnInspectorGUI ( ) ;
@@ -27,23 +34,31 @@ public override void OnInspectorGUI()
2734
2835 EditorGUI . BeginDisabledGroup ( EditorApplication . isPlayingOrWillChangePlaymode & Application . isPlaying ) ;
2936 {
30- EditorGUILayout . PropertyField ( m_adUnitId , m_adUnitIdGUIContent ) ;
37+ EditorGUILayout . PropertyField ( m_adUnitIdAndroid , m_adUnitIdAndroidGUIContent ) ;
38+ EditorGUILayout . PropertyField ( m_adUnitIdiOS , m_adUnitIdiOSGUIContent ) ;
39+ EditorGUILayout . PropertyField ( m_adUnitIdWebGL , m_adUnitIdWebGLGUIContent ) ;
40+ EditorGUILayout . PropertyField ( m_adUnitIdWebGLWeChat , m_adUnitIdWebGLWeChatGUIContent ) ;
41+ EditorGUILayout . PropertyField ( m_adUnitIdWebGLDouYin , m_adUnitIdWebGLDouYinGUIContent ) ;
3142 }
3243 EditorGUI . EndDisabledGroup ( ) ;
3344
3445 serializedObject . ApplyModifiedProperties ( ) ;
3546
3647 Repaint ( ) ;
3748 }
38-
49+
3950 protected override void RefreshTypeNames ( )
4051 {
4152 RefreshComponentTypeNames ( typeof ( IAdvertisementManager ) ) ;
4253 }
4354
4455 protected override void Enable ( )
4556 {
46- m_adUnitId = serializedObject . FindProperty ( "m_adUnitId" ) ;
57+ m_adUnitIdAndroid = serializedObject . FindProperty ( "m_adUnitIdAndroid" ) ;
58+ m_adUnitIdiOS = serializedObject . FindProperty ( "m_adUnitIdiOS" ) ;
59+ m_adUnitIdWebGL = serializedObject . FindProperty ( "m_adUnitIdWebGL" ) ;
60+ m_adUnitIdWebGLWeChat = serializedObject . FindProperty ( "m_adUnitIdWebGLWeChat" ) ;
61+ m_adUnitIdWebGLDouYin = serializedObject . FindProperty ( "m_adUnitIdWebGLDouYin" ) ;
4762 }
4863 }
4964}
0 commit comments