docs.unity.cn
    Show / Hide Table of Contents

    Class ServerRpcAttribute

    Marks a method as ServerRpc.

    A ServerRpc marked method will be fired by a client but executed on the server.

    Inheritance
    Object
    Attribute
    RpcAttribute
    ServerRpcAttribute
    Inherited Members
    RpcAttribute.Delivery
    Namespace: Unity.Netcode
    Syntax
    [AttributeUsage(AttributeTargets.Method)]
    public class ServerRpcAttribute : RpcAttribute, _Attribute

    Fields

    RequireOwnership

    Whether or not the ServerRpc should only be run if executed by the owner of the object

    Declaration
    public bool RequireOwnership
    Field Value
    Type Description
    Boolean
    Back to top Copyright © 2023 Unity Technologies
    Generated by DocFX
    on Friday, April 21, 2023
    Terms of use