docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Despawn

    Despawn(bool)

    Despawns the GameObject of this NetworkObject and sends a destroy message for it to all connected clients.

    Declaration
    public void Despawn(bool destroy = true)
    Parameters
    Type Name Description
    bool destroy

    (true) the GameObject will be destroyed (false) the GameObject will persist after being despawned

    In This Article
    • Despawn(bool)
    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)