docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method OnNetworkObjectParentChanged

    OnNetworkObjectParentChanged(NetworkObject)

    Gets called when the parent NetworkObject of this NetworkBehaviour's NetworkObject has changed

    Declaration
    public override void OnNetworkObjectParentChanged(NetworkObject parentNetworkObject)
    Parameters
    Type Name Description
    NetworkObject parentNetworkObject

    the new NetworkObject parent

    Overrides
    NetworkBehaviour.OnNetworkObjectParentChanged(NetworkObject)
    Remarks

    When a parent changes, non-authoritative instances should:

    • Apply the resultant position, rotation, and scale from the parenting action.
    • Clear interpolators (even if not enabled on this frame)
    • Reset the interpolators to the position, rotation, and scale resultant values. This prevents interpolation visual anomalies and issues during initial synchronization
    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)