diff --git a/Assets/Package/CHANGELOG.md b/Assets/Package/CHANGELOG.md index 1961410..2f8c2aa 100644 --- a/Assets/Package/CHANGELOG.md +++ b/Assets/Package/CHANGELOG.md @@ -1,3 +1,13 @@ +## 1.2.8 [15.09.2026] + +### Changed: +- Adjust SceneParentAutomaticLoader to affect only AutoRun-based SceneContexts + +## 1.2.7 [13.09.2026] + +### Changed: +- Remove SetActiveScene calls caused by Zenject's internal editor scripts + ## 1.2.6 [27.04.2023] ### Changed: @@ -9,6 +19,7 @@ - RootContext implementation - FixedContext implementation - ContextOrderHelper implementation + ### Changed: - Rename ExposableInstaller to ExposableSubInstaller @@ -21,6 +32,7 @@ ### Added: - Processable installers and ISubProcessor interface + ### Changed: - Renamed: IMinorInstaller => ISubInstaller - Renamed: GeneralInstaller => ContextInstaller @@ -34,6 +46,7 @@ ### Added: - Possibility to predefine ProjectContext using InjectionManager + ### Changed: - Zenject update (v9.3.1) diff --git a/Assets/Package/Plugins/Zenject/Editor/SceneParentLoading/SceneParentAutomaticLoader.cs b/Assets/Package/Plugins/Zenject/Editor/SceneParentLoading/SceneParentAutomaticLoader.cs index c0f17a8..4ae6450 100644 --- a/Assets/Package/Plugins/Zenject/Editor/SceneParentLoading/SceneParentAutomaticLoader.cs +++ b/Assets/Package/Plugins/Zenject/Editor/SceneParentLoading/SceneParentAutomaticLoader.cs @@ -13,6 +13,7 @@ public static class SceneParentAutomaticLoader { static SceneParentAutomaticLoader() { + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; EditorApplication.playModeStateChanged += OnPlayModeStateChanged; } @@ -191,7 +192,8 @@ static void ValidateParentChildMatch( Assert.That(parentIndex < childIndex, "Parent scene '{0}' must be loaded before child scene '{1}'. Please drag it to be placed above its child in the scene hierarchy.", parentSceneInfo.Scene.name, sceneInfo.Scene.name); - if (activeIndex > parentIndex) + var parentContext = parentSceneInfo.SceneContext; + if (activeIndex > parentIndex && parentContext != null && parentContext.AutoRun) { EditorSceneManager.SetActiveScene(parentSceneInfo.Scene); } diff --git a/Assets/Package/Plugins/Zenject/Runtime/Install/Contexts/RunnableContext.cs b/Assets/Package/Plugins/Zenject/Runtime/Install/Contexts/RunnableContext.cs index e37e7a9..07358f6 100644 --- a/Assets/Package/Plugins/Zenject/Runtime/Install/Contexts/RunnableContext.cs +++ b/Assets/Package/Plugins/Zenject/Runtime/Install/Contexts/RunnableContext.cs @@ -17,7 +17,9 @@ public abstract class RunnableContext : Context static bool _staticAutoRun = true; public bool Initialized { get; private set; } - + + public bool AutoRun => _autoRun; + #if UNITY_EDITOR // Required for disabling domain reload in enter the play mode feature. See: https://docs.unity3d.com/Manual/DomainReloading.html [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] @@ -27,7 +29,7 @@ static void ResetStaticValues() { return; } - + _staticAutoRun = true; } #endif @@ -36,7 +38,7 @@ static void ResetStaticValues() protected override void ResetInstanceFields() { base.ResetInstanceFields(); - + Initialized = false; } #endif diff --git a/Assets/Package/Runtime/ContextInstaller.cs b/Assets/Package/Runtime/ContextInstaller.cs index 6ae626c..fc012b2 100644 --- a/Assets/Package/Runtime/ContextInstaller.cs +++ b/Assets/Package/Runtime/ContextInstaller.cs @@ -9,7 +9,7 @@ namespace BroWar.Injection [AddComponentMenu("BroWar/Injection/Context Installer")] public class ContextInstaller : MonoInstaller { - [SerializeReference, ReferencePicker(TypeGrouping = TypeGrouping.ByFlatName), ReorderableList(elementLabel: "Installer")] + [SerializeReference, ReferencePicker, ReorderableList(elementLabel: "Installer")] private ISubInstaller[] installers; protected virtual void HandleInstallers() diff --git a/Assets/Package/package.json b/Assets/Package/package.json index 0a34d38..781493d 100644 --- a/Assets/Package/package.json +++ b/Assets/Package/package.json @@ -1,7 +1,7 @@ { "name": "com.browar.injection", "displayName": "Injection", - "version": "1.2.6", + "version": "1.2.8", "unity": "2018.1", "description": "Dependency Injection system.", "keywords": [