public static class MetaScannerReads a .meta file's envelope and stops.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
This is why the schema puts the envelope first. [08](../../../docs/plan/08-asset-pipeline-and-addressables.md) budgets a GUID index rebuild of a hundred thousand assets at under ten seconds. Parsing a hundred thousand complete documents does not fit in that; reading the first few lines of each does, and the importer's settings block — which is most of the file and all of the work — is never touched.
So this is a line scanner rather than the YAML parser, and it can be because it is looking at a fixed, known prefix of a file this repository also writes: three top-level keys, in order, no anchors, no flow at the root. Anything it cannot make sense of it declines, and the caller falls back to a full parse — a wrong answer here would be a corrupt index, so it says "no" rather than guessing.
Methods (2)
public static bool TryScan(ReadOnlySpan<char> text, out MetaEnvelope envelope)Reads the envelope out of a document.
public static bool TryScanFile(string path, out MetaEnvelope envelope)Reads the envelope out of a file.
Used by (2)
- MetaTestsVixen.Core.Yaml.Tests
- AssetDatabaseVixen.Editor.Core