Show Buttons in entity editor

- ScriptEngine: Added HasCustomAttribute- extension method
- ScriptEngine: Added Application class
This commit is contained in:
Simon Lübeß
2023-12-12 13:38:29 +01:00
parent 13cb043cf4
commit e69e1b5526
12 changed files with 253 additions and 42 deletions
+6
View File
@@ -110,6 +110,8 @@ namespace GlitchyEditor
{
Application.Get().Window.IsVSync = true;
ScriptEngine.ApplicationInfo.IsEditor = true;
_contentManager = contentManager;
InitGraphics();
@@ -871,6 +873,8 @@ namespace GlitchyEditor
using (Scene runtimeScene = new Scene())
{
ScriptEngine.ApplicationInfo.IsInPlayMode = true;
_editorScene.CopyTo(runtimeScene, true);
SetActiveScene(runtimeScene, startRuntime: true, startSimulation: true);
@@ -951,6 +955,8 @@ namespace GlitchyEditor
/// Stops the simulation or game and returns to edit mode.
private void OnSceneStop()
{
ScriptEngine.ApplicationInfo.IsInEditMode = true;
SetActiveScene(_editorScene, startRuntime: true, startSimulation: false);
// TODO: _editorScene.DeserializeScripts(scriptData);