Skip to content

Commit 1bf2ef4

Browse files
committed
add MonoBehaviourScopedInjected
1 parent 4d27927 commit 1bf2ef4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 7.0.0
2+
- Add `MonoBehaviourInjected` and `MonoBehaviourScoped`
23
- Renamed classes: \*MonoBehavior\* -> \*MonoBehavio**u**r\*
34
- InjectedMonoBehavior now removes Scope from the store during `OnDestroy`
45
- ScopeStore is now generic

UnityProject/Injecter.Unity/Assets/Injecter.Unity/MonoBehaviourScoped.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,12 @@ public abstract class MonoBehaviourScoped : InjectedMonoBehaviour
99
{
1010
protected MonoBehaviourScoped() : base(true) { }
1111
}
12+
13+
/// <summary>
14+
/// Inherit from this class to easily enable injection
15+
/// </summary>
16+
public abstract class MonoBehaviourInjected : InjectedMonoBehaviour
17+
{
18+
protected MonoBehaviourInjected() : base(true) { }
19+
}
1220
}

0 commit comments

Comments
 (0)