15 lines
557 B
C#
15 lines
557 B
C#
using RebootKit.Engine.Foundation;
|
|
using UnityEngine;
|
|
|
|
namespace RebootKit.Engine {
|
|
public class MainSceneInstaller : SceneDependencyInstaller {
|
|
public override void Install(DIContext context) {
|
|
foreach (GameObject rootGameObject in gameObject.scene.GetRootGameObjects()) {
|
|
IService[] services = rootGameObject.GetComponentsInParent<IService>();
|
|
foreach (IService service in services) {
|
|
context.Bind(service.GetType(), service);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |