public override void OnInspectorGUI() { ETCArea t = (ETCArea)target; t.show = ETCGuiTools.Toggle("Show at runtime", t.show, true); EditorGUILayout.Space(); preset = (ETCArea.AreaPreset)EditorGUILayout.EnumPopup("Preset", preset); if (preset != ETCArea.AreaPreset.Choose) { t.ApplyPreset(preset); preset = ETCArea.AreaPreset.Choose; } }
public override void OnInspectorGUI() { ETCArea t = (ETCArea)target; t.show = ETCGuiTools.Toggle("Show at runtime", t.show, true); EditorGUILayout.Space(); preset = (ETCArea.AreaPreset)EditorGUILayout.EnumPopup("Preset", preset); if (preset != ETCArea.AreaPreset.Choose) { t.ApplyPreset(preset); preset = ETCArea.AreaPreset.Choose; } if (GUI.changed) { EditorUtility.SetDirty(t); EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); } }
static int _m_ApplyPreset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); ETCArea gen_to_be_invoked = (ETCArea)translator.FastGetCSObj(L, 1); { ETCArea.AreaPreset _preset; translator.Get(L, 2, out _preset); gen_to_be_invoked.ApplyPreset(_preset); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }