docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ResetListenPort

    ResetListenPort(int)

    Listen on a new port the next time the server starts. If the server is already running, it will be stopped and restarted automatically.

    Declaration
    public void ResetListenPort(int port = 0)
    Parameters
    Type Name Description
    int port

    Specify a port to listen on. Default is 0 to choose any open port

    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)