docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SyncListInt

    A list of integers that will be synchronized from server to clients.

    Inheritance
    object
    SyncList<int>
    SyncListInt
    Implements
    IList<int>
    ICollection<int>
    IEnumerable<int>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Networking
    Assembly: com.unity.multiplayer-hlapi.Runtime.dll
    Syntax
    [Obsolete("The high level API classes are deprecated and will be removed in the future.")]
    public class SyncListInt : SyncList<int>, IList<int>, ICollection<int>, IEnumerable<int>, IEnumerable

    Methods

    DeserializeItem(NetworkReader)

    This method is used when deserializing SyncList items from a stream.

    Declaration
    protected override int DeserializeItem(NetworkReader reader)
    Parameters
    Type Name Description
    NetworkReader reader

    Stream to read from.

    Returns
    Type Description
    int

    New instance of the SyncList value type.

    Overrides
    SyncList<int>.DeserializeItem(NetworkReader)

    ReadInstance(NetworkReader)

    Declaration
    [Obsolete("ReadReference is now used instead")]
    public static SyncListInt ReadInstance(NetworkReader reader)
    Parameters
    Type Name Description
    NetworkReader reader
    Returns
    Type Description
    SyncListInt

    ReadReference(NetworkReader, SyncListInt)

    An internal function used for serializing SyncList member variables.

    Declaration
    public static void ReadReference(NetworkReader reader, SyncListInt syncList)
    Parameters
    Type Name Description
    NetworkReader reader
    SyncListInt syncList

    SerializeItem(NetworkWriter, int)

    This is used to write a value object from a SyncList to a stream.

    Declaration
    protected override void SerializeItem(NetworkWriter writer, int item)
    Parameters
    Type Name Description
    NetworkWriter writer

    Stream to write to.

    int item

    Item to write.

    Overrides
    SyncList<int>.SerializeItem(NetworkWriter, int)

    WriteInstance(NetworkWriter, SyncListInt)

    Declaration
    public static void WriteInstance(NetworkWriter writer, SyncListInt items)
    Parameters
    Type Name Description
    NetworkWriter writer
    SyncListInt items

    Implements

    IList<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    In This Article
    Back to top
    Copyright © 2025 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)