Releases: PaulNonatomic/ServiceKit
Releases · PaulNonatomic/ServiceKit
2.0.2
2.0.1
ServiceKit 2.0.1
Changed
- Samples directory: Renamed
Samples/toSamples~/following Unity package convention. Samples are now hidden from the project and importable via the Package Manager Samples tab.
2.0.0
ServiceKit 2.0.0
Major release replacing the generic ServiceKitBehaviour<T> pattern with attribute-based registration, adding fluent APIs, one-liner injection, and comprehensive race condition fixes.
Highlights
[Service]attribute replacesServiceKitBehaviour<T>— cleaner declarations, multi-type registration, simpler inheritanceInjectAsync(this, token)— one-liner dependency injection with sensible defaults- Fluent registration —
Register(service).As<IFoo>().WithTags("core").Ready() Inject()builder — shorter alias for custom injection configuration- Atomic
TryResolveService— race-condition-free 3-state service resolution - Race condition hardening — fixes in GetServiceAsync, optional dependencies, UseLocator, and circular detection
- Roslyn Analyzers 0.3.0 — SK003 catches
[Service]type mismatches, SK005 catches missingbase.Awake()calls
Breaking Changes
ServiceKitBehaviour<T>replaced with non-genericServiceKitBehaviour+[Service(typeof(T))]InjectServicesAsync()deprecated in favour ofInject()/InjectAsync()- API renames from v1:
Registered→IsServiceRegistered,Ready→IsServiceReady, etc.
Migration
// Before (v1.x)
public class AudioManager : ServiceKitBehaviour<IAudioService>, IAudioService { }
await locator.InjectServicesAsync(this)
.WithErrorHandling().WithTimeout()
.ExecuteWithCancellationAsync(destroyCancellationToken);
// After (v2.0)
[Service(typeof(IAudioService))]
public class AudioManager : ServiceKitBehaviour, IAudioService { }
await locator.InjectAsync(this, destroyCancellationToken);See the README migration guide for full details.
1.0.0
ServiceKit 1.0.0
The first stable release of ServiceKit, featuring:
- ServiceKitBehaviour<T> generic base class for MonoBehaviour services
- Two-phase lifecycle: Register → Ready with async dependency injection
- [InjectService] attribute for field-based dependency injection
- Intelligent 3-state optional dependencies: Ready → inject, registered → wait, absent → skip
- Circular dependency detection with path reporting and exemption support
- Service tags for runtime organization and filtering
- UniTask integration for zero-allocation async when available
- Fluent injection builder:
.WithTimeout().WithCancellation().ExecuteAsync() - ServiceKit Debug Window with scene-based grouping, search, and service inspection
- Addressables support for loading ServiceKitLocator assets on demand
- Memory-optimized object pooling for allocations
- Comprehensive test suite for race conditions and edge cases