Service Locator

Service Locator is the central runtime registry used by the systems packages.

Service Locator Debug Window

It supports:

  • registration by service type
  • optional keyed registration (string key)
  • multiple registrations for the same type/key
  • lookup APIs like Get<T>() and GetAll<T>(key)

Typical Use

Register services at startup (usually through registries/providers and sequencer startup flow), then resolve from runtime systems.

csharp
ServiceLocator.Register(myService, typeof(IMyService)); IMyService service = ServiceLocator.Get<IMyService>();

Keyed Services

Keyed registration is used heavily by data catalogs:

csharp
ServiceLocator.Register(catalog, typeof(ICatalog), "ItemIcon", append: true); var catalogs = ServiceLocator.GetAll<ICatalog>("ItemIcon");

Debug Window (Editor)

There is a built-in editor tool to inspect what’s currently registered:

  • Menu: Tools > CupkekGames > Service Locator Debug

What it’s good for:

  • confirm your services are registered (and under which keys)
  • debug catalog lookups (ICatalog, IAssetCatalog, IAssetCatalog<T>)
  • see lazy registrations (type known, instance not created yet)
  • search/filter and group by namespace

Notable features:

  • “Catalog types” filter to focus on catalog-related services
  • instance list grouped by registration key (shows (default) vs keyed entries)
  • Ping/Open buttons to locate UnityEngine.Object instances

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL