From 933e95e418c5cbe646e0d8531ae98b9ef724ca69 Mon Sep 17 00:00:00 2001 From: Marco Klein Date: Wed, 10 May 2023 23:31:52 +0200 Subject: [PATCH] feat: :sparkles: Add CurrentScene Property --- Source/Visuals/SceneManagementService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Visuals/SceneManagementService.cs b/Source/Visuals/SceneManagementService.cs index e5b6d9a..17f8ba0 100644 --- a/Source/Visuals/SceneManagementService.cs +++ b/Source/Visuals/SceneManagementService.cs @@ -3,7 +3,6 @@ using System.Collections.ObjectModel; using Microsoft.Extensions.Logging; -// TODO: Current Scene Property // TODO: OnSceneChanged Event // TODO: OnSceneChanging Event - Scene Change blocker? @@ -17,6 +16,8 @@ public class SceneManagementService #endregion #region Properties + public TSceneEnum CurrentScene { get; set; } + public ReadOnlyDictionary RegisteredSceneFiles { get { return new ReadOnlyDictionary(this._registeredScenes); @@ -69,6 +70,8 @@ public void LoadScene(TSceneEnum sceneKey) { var appHostNode = this._appHostNodeProvider.GetNode(); appHostNode.GetTree().ChangeSceneToFile(fileName); + this.CurrentScene = sceneKey; + this._logger.LogInformation("Done Loading Scene '{0}'", Enum.GetName(typeof(TSceneEnum), sceneKey), fileName);