docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Identify null references

    A null reference exception can happen when Unity removes (strips) GameObjects or components for a multiplayer role when those objects are referenced by other objects. Unity checks for null references when you build a project or enter play mode.

    To identify when a null reference exception happens, do the following:

    1. Open the Project Settings window (Edit > Project Settings).
    2. Select Multiplayer > Multiplayer Roles.
    3. Select the Safety Checks checkbox.

    For more information about the Multiplayer Roles properties, refer to Multiplayer Role reference.

    In This Article
    Back to top
    Copyright © 2024 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)