Quickstart — LoL Engine in 5 Minutes¶
This is the canonical first-run path. Follow it once and you'll have a working LoL Engine project with a playable demo scene.
What You Get¶
By the end of this guide:
- A
ServiceConfigurationasset that controls which engine services run - A bootstrapped scene that initializes the engine on Play
- A working sound playing through the audio service
- A foundation you can clone for every other system (save/load, localization, pooling, etc.)
Total time: ~5 minutes if you already have Unity 6000.0 open.
Step 1 — Install (30 seconds)¶
If you got LoL Engine from the Asset Store, it's already in your project. Skip to Step 2.
If you're installing from a Git URL or local tarball, open Window → Package Manager → + → Add package from disk / git URL and point at the package.
Confirm install by checking that Window → Package Manager → LoL Engine is visible.
Step 2 — Run the Setup Wizard (90 seconds)¶
The wizard creates a ServiceConfiguration asset for your project — one file that toggles which engine services start.
- Open Tools → LoL Engine → Setup Wizard.
- Pick the Default profile (enables every service except experimental ones).
- Accept the default output path. In a project that installed LoL Engine from the Asset Store / Package Manager, the wizard defaults to
Assets/Resources/Configs/(your game's own Resources folder). Do not write configs intoAssets/LoLEngine/...— that folder is engine-owned. - Click through to the end. The wizard creates:
ServiceConfiguration.asset— the master toggle listDefaultLoLEngineConfig.asset— engine-wide settingsDefaultAudioConfig.asset,DefaultSaveConfig.asset, etc. — per-service settings- Verify the assets appear under
Assets/Resources/Configs/.
Note: You can have more than one ServiceConfiguration. Pick which one a scene uses by assigning it to the Service Configuration field of the
ImprovedGameInitializercomponent (next step).
Step 3 — Open a Demo Scene (10 seconds)¶
Seven demo scenes ship pre-wired under Assets/LoLEngine/Samples~/:
| Scene | Path |
|---|---|
| Getting Started | Scripts/Scenes/00_GettingStarted.unity |
| Audio Playback | BasicAudio/Scenes/AudioPlayback.unity |
| Save / Load | DataPersistence/Scenes/SaveLoad.unity |
| Bullet Pool | ObjectPooling/Scenes/BulletPool.unity |
| Localization | Localization/Scenes/LocalizedText.unity |
| RNG Demo | Rng/Scenes/RngDemo.unity |
| Notifications | NotificationSystem/Scenes/Notifications.unity |
Optional — regenerate scenes: Run Tools → LoL Engine → Create Sample Scenes to rebuild the bundled .unity files (for example after a Unity upgrade reserializes them). This overwrites the existing scenes.
Each demo scene is self-contained: it references its own bundled per-sample
ServiceConfiguration(in that sample'sConfigs/folder), not the project config you created in Step 2. The scenes open and run standalone — you do not need to re-wire them to your Step 2 asset.Package Manager → Samples → Import adds optional sample folders (scripts, audio, CSVs). The
.unityscenes above are already in the package; import is not required to open them.
Step 4 — Press Play on the Audio Demo (60 seconds)¶
- Open
Assets/LoLEngine/Samples~/BasicAudio/Scenes/AudioPlayback.unity. - Verify the Hierarchy contains:
EngineInitializer,Main Camera,AudioController,AudioCanvas(with three buttons),EventSystem. - Press Play.
- Click Play SFX — you'll hear
Demo_Click.wav(a short UI click). - Click Play Music — you'll hear
Demo_Music.wavfade in over 2 seconds. - Click Stop All — everything stops.
If anything fails, check the Troubleshooting section at the bottom.
Step 5 — Use a Service in Your Own Code (90 seconds)¶
Now write your own MonoBehaviour that uses an engine service. Create a new C# script anywhere in Assets/Scripts/:
using LoLEngine.Core.Audio.Extensions;
using LoLEngine.Core.DataPersistence.Interfaces;
using LoLEngine.Core.Localization.Interfaces;
using LoLEngine.Core.Rng;
using LoLEngine.Core.ServiceManagement.Service;
using LoLEngine.Runtime;
using UnityEngine;
public class MyController : MonoBehaviour
{
void Start()
{
// Wait for all engine services to initialize before using them
ServiceAwaiter.WaitForServices(this, OnReady, OnTimeout);
}
void OnReady()
{
// Play the demo click — same audio service the sample uses
this.PlaySound("Demo_Click", AudioExtensions.UITrack);
}
void OnTimeout()
{
Debug.LogError("Engine services failed to initialize within timeout.");
}
}
Add this script to a new GameObject in any scene that has an EngineInitializer. Press Play — you'll hear the click.
That's it. Every other engine service follows the same pattern:
var save = ServiceLocator.Instance.Get<ISaveSystem>();
var rng = ServiceLocator.Instance.Get<IRngService>();
var loc = ServiceLocator.Instance.Get<ILocalizationService>();
What's Next?¶
| Goal | Read |
|---|---|
| Full setup walkthrough (manual config, every service) | GettingStarted.md |
| Understand the service locator pattern | ServiceLocator.md |
| Add your own services to the engine | 02-SERVICES-CHECKLIST.md |
| Set up persistent saves | DataPersistence.md |
| Add multi-language text | Localization.md and LOCALIZATION_MIGRATION.md |
| Cheat-sheet for every system | CHEATSHEET-How-To-Use.md |
| Architectural decisions and rationale | Architecture.md |
Troubleshooting¶
| Symptom | Most likely cause | Fix |
|---|---|---|
| Console: "ServiceConfiguration not found" | Wizard wasn't run, or asset is in wrong folder | Re-run Tools → LoL Engine → Setup Wizard |
| Console: "ImprovedGameInitializer: timeout" | One of the enabled services failed to initialize | Look for the first [ERROR] line above the timeout — that's the root cause |
| Audio plays silently | Volume is muted or AudioConfig master volume is 0 |
Check DefaultAudioConfig.asset → Master Volume |
| "Service not found: IFooService" | Service is disabled in ServiceConfiguration |
Open the asset, check the Enable Foo Service toggle |
| Demo scenes missing | Wrong package path or partial copy | Confirm Assets/LoLEngine/Samples~/…/Scenes/*.unity exists; re-import package or run Create Sample Scenes |
| Buttons in demo do nothing | EventSystem missing or wrong Input Module | Ensure an EventSystem with StandaloneInputModule or InputSystemUIInputModule matching your project's active input backend |
For deeper issues, check Troubleshooting.md.
Unity: 6000.0+ — engine version: see package.json or CHANGELOG.md