Class ContentRegistrationCheck
Answers "is this asset registered as content?" for editor code that has to warn about an asset nothing can resolve, and lives in one place because two classes ask it on every inspector change.
It reads the content manifest, which is what the runtime resolves names against. The code it replaces asked Addressables whether an entry existed, and those are not the same question — an Addressable entry and a content key can disagree, and when they do the manifest is the one the game actually uses. Asking the manifest is also what let the callers stop forcing an address to equal a path, which was the other half of what they did.
public static class ContentRegistrationCheck
- Inheritance
-
objectContentRegistrationCheck
Methods
- IsRegistered(string)
Whether an asset path is something the content manifest can resolve.
- KeyForPath(string)
The content key the manifest resolves an asset path under, or null when the path is not content.
This is the question a caller that is writing a reference has to ask: an encoded reference is meant to be resolvable by the runtime, and the runtime resolves against the manifest. Asking Addressables instead — which is what ContentEncoder did — answers about a different table, and the two can disagree.
- Message(string)
The message for an unregistered asset, worded once so both warnings say the same thing.