Method ThrowIfCollectionNotFinalized
ThrowIfCollectionNotFinalized(in FixedString512Bytes)
We have no idea how many code-generated types are left to be registered, so instead,
we have a flag that is set when we know ALL of them have been created.
If the user queries this collection BEFORE all queries have been created, then they'll get silent errors where GhostFields default to DontSerializeVariant
.
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public void ThrowIfCollectionNotFinalized(in FixedString512Bytes context)
Parameters
Type | Name | Description |
---|---|---|
FixedString512Bytes | context | The context of this call, to aid in error reporting. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Throws if user-code queries too early. |