Skip to content
Mika Notarnicola edited this page Jul 18, 2026 · 13 revisions

Bootstrap

A rock-solid mechanism for consistent, testable, and configurable application bootstrapping for Unity.

github.com/thebeardphantom/Bootstrap · MIT License · C#


Bootstrap is a dependency injection and service locator framework for Unity. Time and time again developers hit the same issues in the Unity projects core architecture:

  1. Their game code attempts to use services before they've been created (i.e. during Awake/Start).
  2. Entering play mode isn't as simple as hitting Play. Most projects either require opening a dedicated bootstrap scene before entering play mode, or have their own custom "enter playmode" menu item which does that for you. Even with such a mechanism, you then have to navigate (in play mode) to whatever scene you were working on in edit mode.

Bootstrap addresses both of these directly:

Services are defined as assets, so game code never has to care whether one exists yet: it can be used the moment it's referenced, with no null checks, no guessing at initialization order, and no defensive workarounds for "is this ready." You can hit Play from whatever scenes you're editing and Bootstrap will run its consistent initialization flow before automatically loading the scenes you had open in edit mode.

Guides

License

MIT License.

Links

Clone this wiki locally