{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method ThrowIfNotInRegistrationPhase | Netcode for Entities | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ThrowIfNotInRegistrationPhase

    ThrowIfNotInRegistrationPhase(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 used to get silent errors where GhostFields default to DontSerializeVariant. This throw highlights that user-error.

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public void ThrowIfNotInRegistrationPhase(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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)