Class SyncListStruct<T> | Multiplayer HLAPI | 1.0.8
docs.unity3d.com
    Show / Hide Table of Contents

    Class SyncListStruct<T>

    This class is used for lists of structs that are synchronized from the server to clients.

    To use SyncListStruct, derive a new class with your struct as the generic parameter.

    Inheritance
    Object
    SyncList<T>
    SyncListStruct<T>
    Inherited Members
    SyncList<T>.IsReadOnly
    SyncList<T>.Callback
    SyncList<T>.InitializeBehaviour(NetworkBehaviour, Int32)
    SyncList<T>.HandleMsg(NetworkReader)
    SyncList<T>.Add(T)
    SyncList<T>.Clear()
    SyncList<T>.Contains(T)
    SyncList<T>.CopyTo(T[], Int32)
    SyncList<T>.IndexOf(T)
    SyncList<T>.Insert(Int32, T)
    SyncList<T>.Remove(T)
    SyncList<T>.RemoveAt(Int32)
    SyncList<T>.Dirty(Int32)
    SyncList<T>.Item[Int32]
    SyncList<T>.GetEnumerator()
    Namespace: UnityEngine.Networking
    Syntax
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public class SyncListStruct<T> : SyncList<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable where T : struct
    Type Parameters
    Name Description
    T

    Properties

    Count

    Declaration
    public ushort Count { get; }
    Property Value
    Type Description
    UInt16

    Methods

    AddInternal(T)

    Declaration
    public void AddInternal(T item)
    Parameters
    Type Name Description
    T item

    DeserializeItem(NetworkReader)

    Declaration
    protected override T DeserializeItem(NetworkReader reader)
    Parameters
    Type Name Description
    NetworkReader reader
    Returns
    Type Description
    T
    Overrides
    UnityEngine.Networking.SyncList<T>.DeserializeItem(UnityEngine.Networking.NetworkReader)

    GetItem(Int32)

    Declaration
    public T GetItem(int i)
    Parameters
    Type Name Description
    Int32 i
    Returns
    Type Description
    T

    SerializeItem(NetworkWriter, T)

    Declaration
    protected override void SerializeItem(NetworkWriter writer, T item)
    Parameters
    Type Name Description
    NetworkWriter writer
    T item
    Overrides
    UnityEngine.Networking.SyncList<T>.SerializeItem(UnityEngine.Networking.NetworkWriter, T)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023