Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awake of RootLifetimeScope component is not working. #622

Closed
KazukiKuriyama opened this issue Feb 6, 2024 · 2 comments
Closed

Awake of RootLifetimeScope component is not working. #622

KazukiKuriyama opened this issue Feb 6, 2024 · 2 comments

Comments

@KazukiKuriyama
Copy link

A MonoBehaviour component for game preferences is attached in the RootLifetimeScope game object and registers the game default values from Inspector.
I am currently using this component with IInitializable attached to it, as it does not seem to be able to run Awake if I register it with RegisterComponent.
Is it possible to get Awake to work?

@Watcher3056
Copy link

I think Hadashi better to instantiate RootLifeTimeScope as DontDestroyOnLoad instead of referencing just a prefab.

I also expected Awake to work in order to execute some logic such as Resolve of some singletons in order to create them when game starts(such as CameraManager, DevConsole etc.)

Btw, how you succeeded to work it with IInitializable?

@hadashiA
Copy link
Owner

Thanks for the feedback.
I have made the decision to make the change to Insatntiate.
Fixed in #627

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants