hadashiA / VContainer

The extra fast, minimum code size, GC-free DI (Dependency Injection) library running on Unity Game Engine.
https://vcontainer.hadashikick.jp
MIT License
2.02k stars 176 forks source link

Question: When executing as a CustomEditor #721

Closed dev-platong closed 1 week ago

dev-platong commented 2 weeks ago

Is there a way to use VContainer in EditMode rather than PlayMode? Dependencies seem to be registered by Containers added to the scene, but when executing from a CustomEditor, dependency resolution fails and results in an error.

The translation maintains the technical terms (CustomEditor, PlayMode, EditMode, VContainer, Container) as they are commonly used in English programming contexts.

hadashiA commented 1 week ago

Manually using new ContainerBuilder(), containers can be used anywhere in a scene-independent manner.

Please refer to this answer as well. https://github.com/hadashiA/VContainer/issues/464#issuecomment-1418462821