Small, composable Unity 6 services for installation, messaging, ticking, coroutines, pooling, persistence, RNG, time, commands, versioning, and Addressables workflows.
Use Services when you want independently selectable application services without adopting a full DI container. Use a scoped DI solution when you require hierarchical lifetimes or broad constructor injection. The package is pipeline-neutral.
| Item | Current policy |
|---|---|
| Minimum Unity version | 6000.0 |
| Reference streams | 6000.0.x, 6000.3.x, 6000.5.x |
| Reference editors | 6000.0.81f1, 6000.3.21f1, 6000.5.7f1 (primary) |
| Render pipeline | Pipeline-neutral |
| Validation status | Compatibility target; fresh matrix artifacts are required for a validated claim. |
Unity does not resolve Git dependencies transitively. Add the required Git packages explicitly; Addressables and the performance test framework resolve from the Unity registry.
{
"dependencies": {
"com.gamelovers.gamedata": "https://github.com/CoderGamester/Unity-GameData.git#1.0.3",
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask#2.5.10",
"com.gamelovers.services": "https://github.com/CoderGamester/Unity-Services.git#2.2.0"
}
}Install a service once, resolve it through the same facade, and release only the resources your application owns:
using GameLovers.Services;
using UnityEngine;
public sealed class GameBootstrap : MonoBehaviour
{
private TickService tickService;
private void Awake()
{
tickService = new TickService();
MainInstaller.Bind<ITickService>(tickService);
}
private void OnDestroy()
{
MainInstaller.CleanDispose<ITickService>();
}
}Clean<T> unregisters an instance. CleanDispose<T> disposes the registered service and unregisters it. Do not dispose a shared static facility unless this bootstrap exclusively owns it.
| Area | Key API |
|---|---|
| Installation | MainInstaller for one global interface; Installer for multi-interface binding |
| Messaging | IMessageBrokerService pub/sub with explicit unsubscribe ownership |
| Frame work | ITickService and ICoroutineService |
| Pools | IPoolService and object-pool lifecycle hooks |
| State | IDataService, ITimeService, IRngService, commands, and version data |
| Assets | IAssetLoader, ISceneLoader, and AssetResolverService |
Data storage is appropriate for small, non-secret local state. DataService persists through PlayerPrefs by default; pass FileDataStorage for atomic file saves, BrowserLocalDataStorage for WebGL saves that survive new builds, and an optional key prefix to scope saves per profile. See Data Service. Addressables handles must be released by the owner that acquired them; loading and instantiating have different release paths.
For Asset Resolver sample code, call AddConfigs through IAssetAdderService rather than the concrete resolver, and reference GameData directly from any asmdef that uses its public types.
| Sample | Focus |
|---|---|
| Services Playground | Foundation services in a ready-made scene |
| Asset Resolver | Typed Addressables asset lookup and importer tooling |
Read docs, CHANGELOG.md, and MIGRATION.md. Report issues at Unity-Services.