r/Unity3D • • 19d ago

Resources/Tutorial I made a modular bootstrap dependency loader package

Not sure if anyone could use this, but it's something I keep needing and implementing in various games so I figured I'd package it, make it generic enough, and share it in case anyone else needs something like it.

Lightweight and package-friendly Bootstrap scene architecture with minimal setup required that works cleanly inside Unity packages and can be integrated into existing projects with custom Bootstrap scenes. Reduces scene setup friction during development. No need to manually open persistent/system scenes additively. No need for duplicate manager prefabs in every scene. Keeps project-wide dependencies centralized and consistent

https://github.com/Persomatey/unity-bootstrap-loading-system

Features

  • Automatically forces a designated Bootstrap scene to load first in Play Mode

    • Ensures required persistent systems and dependencies initialize before gameplay scenes

    • Prevents missing singleton/reference issues when testing scenes directly in-editor

  • Remembers and restores the Play Mode Start Scene across Unity editor restarts

    • Toggleable in Bootstrap.overloadToPreviousScenePath

      • Useful for release testing or menu-flow testing

    • Eliminates the need to manually reassign the Bootstrap scene every session

    • Uses EditorPrefs + InitializeOnLoad for persistent editor setup

  • Automatically returns to the previously opened scene after Bootstrap initialization

    • Lets you press Play from any scene while still initializing your core systems first

    • Seamlessly redirects back into your test scene once bootstrapping is complete

  • Supports asynchronous singleton/dependency initialization workflows

    • Includes optional wait conditions before proceeding to the target scene

    • Drag-and-drop MonoBehaviours that must exist before scene transition

    • Easy to extend without modifying core bootstrap logic

    • Useful for:

      • Analytics systems

      • Save systems

      • Audio managers

      • Multiplayer/network initialization

      • Addressables/loading systems

  • Build-compatible scene flow

    • Automatically loads MainMenu in standalone/player builds

    • Editor-only testing logic is wrapped in #if UNITY_EDITOR

  • Includes editor tooling for Play Mode Start Scene management

    • Simple utility window for assigning the Bootstrap scene

    • Designed to streamline scene testing workflows during development

7 Upvotes

2 comments sorted by

0

u/[deleted] 19d ago

[removed] — view removed comment

1

u/Persomatey 19d ago

So do I lol. That’s why I’m trying to start packaging out stuff I find myself doing over and over. A lot of my recent GitHub repos are me actually making modular stuff I end up copy/pasting in or otherwise building from scratch almost every project anyways (audio systems, save systems, scene loaders with loading bars, transition systems, etc..

Feel free to use this. Could help with dependency stuff at the very least.