I’ve spent some time researching how to set up a persistent, job-friendly asset pipeline in Unity, but I’m still not sure which path makes the most sense.
Here are my requirements:
- The asset must be persistent (saved in the project, version-controlled).
- I need to build authoring/editor tools so users can edit/import data offline in the Editor.
- My project uses GameObject/MonoBehaviour, not ECS.
- The asset should be readonly at runtime but referenceable by MonoBehaviours.
- Jobs must be able to use the asset data (i.e. data must be in native memory, Burst-safe).
- Multiple MonoBehaviours may reference the same asset in parallel.
- Asset size could be large (4–100 MB).
Options I’m considering
-
Naive ScriptableObject
Supports custom editors, inspector integration, easy to reference.
Not job-friendly: each MonoBehaviour would need to copy into NativeArrays on Awake, leading to duplicated memory. -
BlobAssets (without full ECS)
Idea: use a ScriptableObject for metadata & tooling, and hold a BlobAssetReference inside it.
Workflow: users import data → adjust → click “Bake” → baked asset is stored.
Problems:
BlobAssetReference isn’t serializable, so I can’t persist the baked blob in the SO.
If I build it at runtime, I lose editor access and have to manage disposal carefully.
If I follow the ECS authoring flow, I end up pulling in Entities just for blobs, which feels heavy.
Net result: fiddly lifetime management and dependency creep. -
ScriptedImporter
Haven’t dug deep yet, but seems like I could define a custom .asset or .bytes file type and bake directly into that format.
Might solve the persistence and readonly requirements cleanly. -
Addressables / RawFiles
Could bake out a binary blob as a RawFile and load it directly into a NativeArray<byte> via AsyncReadManager.
Good for large assets (streamable, no managed copy).
More build-pipeline setup, probably overkill if assets aren’t that big.
Which of these 4, or else, are my best option going forward?