docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkVariableBase

    Interface for network value containers

    Inheritance
    object
    NetworkVariableBase
    NetworkList<T>
    NetworkVariable<T>
    NetworkVarBufferCopyTest.DummyNetVar
    Implements
    IDisposable
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Netcode
    Assembly: solution.dll
    Syntax
    public abstract class NetworkVariableBase : IDisposable

    Constructors

    Name Description
    NetworkVariableBase(NetworkVariableReadPermission, NetworkVariableWritePermission)

    The default constructor for NetworkVariableBase that can be used to create a custom NetworkVariable.

    Fields

    Name Description
    DefaultReadPerm

    The default read permissions

    DefaultWritePerm

    The default write permissions

    ReadPerm

    The read permission for this var

    WritePerm

    The write permission for this var

    Properties

    Name Description
    Name

    Gets or sets the name of the network variable's instance (MemberInfo) where it was declared.

    Methods

    Name Description
    CanClientRead(ulong)

    Gets if a specific client has permission to read the var or not

    CanClientWrite(ulong)

    Gets if a specific client has permission to write the var or not

    Dispose()

    Virtual IDisposable implementation

    GetBehaviour()
    Initialize(NetworkBehaviour)

    Initializes the NetworkVariable

    IsDirty()

    Gets Whether or not the container is dirty

    MarkNetworkBehaviourDirty()
    ReadDelta(FastBufferReader, bool)

    Reads delta from the reader and applies them to the internal value

    ReadField(FastBufferReader)

    Reads the complete state from the reader and applies it

    ResetDirty()

    Resets the dirty state and marks the variable as synced / clean

    SetDirty(bool)

    Sets whether or not the variable needs to be delta synced

    WriteDelta(FastBufferWriter)

    Writes the dirty changes, that is, the changes since the variable was last dirty, to the writer

    WriteField(FastBufferWriter)

    Writes the complete state of the variable to the writer

    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)