danrouse / bsq-zenjeqt

Beat Saber for Quest port of Zenject, dependency injection library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zenjeqt

Zenject's dependency injection for Quest! Constructor, method, and field injection are supported (parameter injection is not implemented).

Basic guide

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)

  1. In your custom-types classes, use the REGISTER_X_INJECT macros to mark fields or methods to be injected,
  2. Create an Installer class with an InstallBindings method,
  3. In InstallBindings, call Zenject's binding methods like normal,
  4. Register the Installer with using Zenjeqtor's OnX methods, such as OnApp, OnMenu, or OnGame.

For basic examples, see the implementations in this repo's test directory.

For more detailed information on Zenject itself, check out the SiraUtil README.

Credits

About

Beat Saber for Quest port of Zenject, dependency injection library

License:Other


Languages

Language:C++ 89.6%Language:Makefile 6.3%Language:PowerShell 3.8%Language:Batchfile 0.2%