public sealed class ProjectAssetSourcesThe project's own guid index, as the thing an import resolves through.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A wrapper and not a method on AssetDatabase, because the database is the editor's and the seam is the pipeline's. An import is allowed to ask where an asset is and nothing else — not to enumerate the project, not to scan it, not to write a sidecar — and an interface with one method is what makes that statement checkable.
⚠ Read-only by construction, deliberately. Scan writes — it creates a missing .meta with a fresh GUID and moves an orphaned one into Library/OrphanMeta — so a resolver that scanned on demand would let an importer change the project it is importing, from inside a parallel loop. This only ever reads what the coordinator has already scanned.
⚠ A folder resolves to nothing. A folder asset has a GUID and a .meta like everything else, and it has no source file to open — so answering with its directory would hand an importer a path every read of which fails, which is worse than the miss.
Methods (2)
public ProjectAssetSources(AssetDatabase database)The project's own guid index, as the thing an import resolves through.
public bool TryGetPath(AssetId asset, out VirtualPath path)Finds where an asset's source file is.
Used by (3)
- ImportPipelineVixen.Editor.Assets
- ImportResolveTestsVixen.Editor.Assets.Tests
- WorkerHostVixen.AssetCompiler