@@ -22,7 +22,8 @@ public sealed class PaymentComponentInspector : ComponentTypeComponentInspector
2222 private GUIContent m_componentAndroidTypeGUIContent = new GUIContent ( "Android平台支付组件" ) ;
2323 private GUIContent m_componentIOSTypeGUIContent = new GUIContent ( "iOS平台支付组件" ) ;
2424 private GUIContent m_componentWebGLTypeGUIContent = new GUIContent ( "WebGL平台支付组件" ) ;
25- private GUIContent m_componentPCTypeGUIContent = new GUIContent ( "PC平台支付组件" ) ;
25+ private GUIContent m_componentPCTypeGUIContent = new GUIContent ( "PC平台支付组件 (Windows/Linux)" ) ;
26+ private GUIContent m_componentMacTypeGUIContent = new GUIContent ( "macOS平台支付组件" ) ;
2627
2728 private SerializedProperty ComponentAndroidType = null ;
2829 private string [ ] ComponentAndroidTypeNames = null ;
@@ -40,6 +41,10 @@ public sealed class PaymentComponentInspector : ComponentTypeComponentInspector
4041 private string [ ] ComponentPCTypeNames = null ;
4142 private int ComponentPCTypeNameIndex = 0 ;
4243
44+ private SerializedProperty ComponentMacType = null ;
45+ private string [ ] ComponentMacTypeNames = null ;
46+ private int ComponentMacTypeNameIndex = 0 ;
47+
4348 public override void OnInspectorGUI ( )
4449 {
4550 base . OnInspectorGUI ( ) ;
@@ -79,6 +84,14 @@ public override void OnInspectorGUI()
7984 ComponentPCTypeNameIndex = componentPCTypeNameIndex ;
8085 ComponentPCType . stringValue = componentPCTypeNameIndex <= 0 ? null : ComponentPCTypeNames [ componentPCTypeNameIndex ] ;
8186 }
87+
88+ EditorGUILayout . LabelField ( m_componentMacTypeGUIContent ) ;
89+ int componentMacTypeNameIndex = EditorGUILayout . Popup ( "Component Mac Type" , ComponentMacTypeNameIndex , ComponentMacTypeNames ) ;
90+ if ( componentMacTypeNameIndex != ComponentMacTypeNameIndex )
91+ {
92+ ComponentMacTypeNameIndex = componentMacTypeNameIndex ;
93+ ComponentMacType . stringValue = componentMacTypeNameIndex <= 0 ? null : ComponentMacTypeNames [ componentMacTypeNameIndex ] ;
94+ }
8295 }
8396 EditorGUI . EndDisabledGroup ( ) ;
8497
@@ -94,10 +107,12 @@ protected override void Enable()
94107 ComponentIOSType = serializedObject . FindProperty ( "m_componentIOSType" ) ;
95108 ComponentWebGLType = serializedObject . FindProperty ( "m_componentWebGLType" ) ;
96109 ComponentPCType = serializedObject . FindProperty ( "m_componentPCType" ) ;
110+ ComponentMacType = serializedObject . FindProperty ( "m_componentMacType" ) ;
97111 RefreshTypeNames ( ComponentAndroidType , ref ComponentAndroidTypeNames , ref ComponentAndroidTypeNameIndex , typeof ( IPaymentManager ) ) ;
98112 RefreshTypeNames ( ComponentIOSType , ref ComponentIOSTypeNames , ref ComponentIOSTypeNameIndex , typeof ( IPaymentManager ) ) ;
99113 RefreshTypeNames ( ComponentWebGLType , ref ComponentWebGLTypeNames , ref ComponentWebGLTypeNameIndex , typeof ( IPaymentManager ) ) ;
100114 RefreshTypeNames ( ComponentPCType , ref ComponentPCTypeNames , ref ComponentPCTypeNameIndex , typeof ( IPaymentManager ) ) ;
115+ RefreshTypeNames ( ComponentMacType , ref ComponentMacTypeNames , ref ComponentMacTypeNameIndex , typeof ( IPaymentManager ) ) ;
101116 }
102117
103118 protected override void RefreshTypeNames ( )
0 commit comments