public override void OnInspectorGUI() { if (GUILayout.Button("Open Configuration")) { ShopConfigurationEditor.Open(this.target as ShopConfig); } }
public override void OnInspectorGUI() { var targ = this.target as Shop; //base.OnInspectorGUI(); targ._verbose = UnityEditor.EditorGUILayout.ToggleLeft("Verbose/Debugging", targ._verbose); ShopConfigurationEditor.DrawProductListSimple(); if (GUILayout.Button("\nOpen Shop Config\n( Manage Products )\n")) { ShopConfigurationEditor.Open(); } targ.overrideEmbeddedShopConfig = UnityEditor.EditorGUILayout.ToggleLeft("Override Embedded Shop Config File", targ.overrideEmbeddedShopConfig); if (targ.overrideEmbeddedShopConfig) { GUI.enabled = true; } else { GUI.enabled = false; } targ.shopConfigInst = (ShopConfig)UnityEditor.EditorGUILayout.ObjectField("Shop Config", targ.shopConfigInst, typeof(ShopConfig), false); GUI.enabled = true; }