docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method CreateServerNetworkDriver

    CreateServerNetworkDriver<T>(T, int)

    Helper method for creating server NetworkDriver given the specified netIf The driver is configured with the internal defaults. See: GetNetworkServerSettings(int).

    Declaration
    public static NetworkDriverStore.NetworkDriverInstance CreateServerNetworkDriver<T>(T netIf, int playerCount = 0) where T : unmanaged, INetworkInterface
    Parameters
    Type Name Description
    T netIf

    the instance of a INetworkInterface to use to create the driver

    int playerCount

    Amount of players the server should allocate receive and send queue for. The estimation is that each player will receive 4 packets.

    Returns
    Type Description
    NetworkDriverStore.NetworkDriverInstance

    A new NetworkDriverStore.NetworkDriverInstance

    Type Parameters
    Name Description
    T

    the INetworkInterface type ot use

    CreateServerNetworkDriver<T>(T, NetworkSettings)

    Helper method for creating server NetworkDriver given the specified INetworkInterface The driver is configured using the NetworkSettings.

    Declaration
    public static NetworkDriverStore.NetworkDriverInstance CreateServerNetworkDriver<T>(T netIf, NetworkSettings settings) where T : unmanaged, INetworkInterface
    Parameters
    Type Name Description
    T netIf
    NetworkSettings settings

    A list of the parameters that describe the network configuration.

    Returns
    Type Description
    NetworkDriverStore.NetworkDriverInstance

    A new NetworkDriverStore.NetworkDriverInstance

    Type Parameters
    Name Description
    T

    the INetworkInterface type ot use

    In This Article
    Back to top
    Copyright © 2023 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)