Zenject's dependency injection for Quest! Constructor, method, and field injection are supported (parameter injection is not implemented).
In general, usage patterns should follow how Zenject is used in PC mods. Notably, SiraUtil's Zenjector class is mostly ported, so those entry points may be used. (TODO: expand on this bit with specifics, once the API is more hardened)
- In your custom-types classes, use the
REGISTER_X_INJECT
macros to mark fields or methods to be injected, - Create an
Installer
class with anInstallBindings
method, - In
InstallBindings
, call Zenject's binding methods like normal, - Register the
Installer
with using Zenjeqtor'sOnX
methods, such asOnApp
,OnMenu
, orOnGame
.
For basic examples, see the implementations in this repo's test
directory.
For more detailed information on Zenject itself, check out the SiraUtil README.
- zoller27osu, Sc2ad and jakibaki - beatsaber-hook
- raftario
- Lauriethefish and danrouse for this template