Update Project
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace Zenject
|
||||
{
|
||||
public class SceneContextRegistryAdderAndRemover : IInitializable, IDisposable
|
||||
{
|
||||
readonly SceneContextRegistry _registry;
|
||||
readonly SceneContext _sceneContext;
|
||||
|
||||
public SceneContextRegistryAdderAndRemover(
|
||||
SceneContext sceneContext,
|
||||
SceneContextRegistry registry)
|
||||
{
|
||||
_registry = registry;
|
||||
_sceneContext = sceneContext;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
_registry.Add(_sceneContext);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_registry.Remove(_sceneContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user