What problem does it solve?
It solves the problem of storing and transporting UnityEngine asset references (like Texture2D, AudioClip, Mesh, Sprite) inside ECS component data in a way that remains blittable and job-friendly, avoiding non-blittable managed objects in hot ECS paths.
Core Features & Use Cases
- Blittable asset identity in IComponentData: Store instance-ID-based identity via
UnityObjectRef<T> so it can live in ECS chunks and be safely copied into job structs.
- Main-thread dereference at point of use: Access
UnityObjectRef.Value only on the main thread when assigning to render/audio/presentation objects.
- Baker dependency tracking: Use
DependsOn(asset) in Bakers to ensure incremental baking correctly updates references when source assets change.
Use case example: You need a per-entity sprite override in DOTS where a Burst job must categorize entities by which sprite asset they reference, and then the actual renderer assignment happens on the main thread.
Quick Start
Ask an AI assistant to generate a UnityObjectRef<Sprite>-based IComponentData component, a corresponding Baker that calls DependsOn(authoring.Sprite), and a job-safe system that compares sprite references by identity while a separate main-thread system applies the dereferenced sprite.