Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Assets/Package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -9,6 +19,7 @@
- RootContext implementation
- FixedContext implementation
- ContextOrderHelper implementation

### Changed:
- Rename ExposableInstaller to ExposableSubInstaller

Expand All @@ -21,6 +32,7 @@

### Added:
- Processable installers and ISubProcessor<T> interface

### Changed:
- Renamed: IMinorInstaller => ISubInstaller
- Renamed: GeneralInstaller => ContextInstaller
Expand All @@ -34,6 +46,7 @@

### Added:
- Possibility to predefine ProjectContext using InjectionManager

### Changed:
- Zenject update (v9.3.1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static class SceneParentAutomaticLoader
{
static SceneParentAutomaticLoader()
{
EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
}

Expand Down Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -27,7 +29,7 @@ static void ResetStaticValues()
{
return;
}

_staticAutoRun = true;
}
#endif
Expand All @@ -36,7 +38,7 @@ static void ResetStaticValues()
protected override void ResetInstanceFields()
{
base.ResetInstanceFields();

Initialized = false;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion Assets/Package/Runtime/ContextInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace BroWar.Injection
[AddComponentMenu("BroWar/Injection/Context Installer")]
public class ContextInstaller : MonoInstaller<ContextInstaller>
{
[SerializeReference, ReferencePicker(TypeGrouping = TypeGrouping.ByFlatName), ReorderableList(elementLabel: "Installer")]
[SerializeReference, ReferencePicker, ReorderableList(elementLabel: "Installer")]
private ISubInstaller[] installers;

protected virtual void HandleInstallers()
Expand Down
2 changes: 1 addition & 1 deletion Assets/Package/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
Loading