public static void RunCodeEmitter() { if (RuntimeSettings.Instance.compileAsDll) { AscensionDataAssemblyCompiler.Run(); } else { AscensionDataAssemblyCompiler.CodeEmit(); } }
void Footer() { GUILayout.BeginHorizontal(); //var version = Assembly.GetExecutingAssembly().GetName().Version; GUILayout.Label(string.Format("{0} ({1})", version, Core.IsDebugMode ? "DEBUG" : "RELEASE"), EditorStyles.miniLabel); GUILayout.FlexibleSpace(); PrefabDatabase db = PrefabDatabase.Instance; if (db.DatabaseMode == PrefabDatabaseMode.ManualScan) { if (DEditorGUI.IconButton("refresh")) { AscensionCompiler.UpdatePrefabsDatabase(); Debug.Log("Upading prefab database..."); } GUILayout.Space(8); } if (DEditorGUI.IconButton("code-emit")) { if (RuntimeSettings.Instance.compileAsDll) { AscensionDataAssemblyCompiler.Run(); } else { AscensionDataAssemblyCompiler.CodeEmit(); } Debug.Log("Compiling project... " + ProjectPath); } GUILayout.Space(8); if (DEditorGUI.IconButton("save-project")) { Save(); Debug.Log("Saving project... " + ProjectPath); } GUILayout.EndHorizontal(); }
protected void OnGUI() { if (Event.current.keyCode == KeyCode.Return && Event.current.type == EventType.KeyDown) { const EventModifiers MODS = EventModifiers.Control; if ((Event.current.modifiers & MODS) == MODS) { Event.current.Use(); // compile! if (RuntimeSettings.Instance.compileAsDll) { AscensionDataAssemblyCompiler.Run(); } else { AscensionDataAssemblyCompiler.CodeEmit(); } } } DEditorGUI.Tooltip = ""; LoadProject(); if (Event.current.type == EventType.Repaint) { Repaints = Mathf.Max(0, Repaints - 1); } if (Selected != null && Selected.Deleted) { Selected = null; } }