docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CommandLineOptions

    This class contains a list of the application instance domain's command line arguments that are used when entering PlayMode or the build is executed.

    Inheritance
    object
    CommandLineOptions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Netcode
    Assembly: Unity.Netcode.Runtime.dll
    Syntax
    public class CommandLineOptions

    Properties

    Instance

    Command-line options singleton

    Declaration
    [Obsolete("Not used anymore replaced by TryGetArg")]
    public static CommandLineOptions Instance { get; }
    Property Value
    Type Description
    CommandLineOptions

    Methods

    GetArg(string)

    Returns the value of an argument or null if the argument is not present

    Declaration
    [Obsolete("Not used anymore replaced by TryGetArg")]
    public string GetArg(string arg)
    Parameters
    Type Name Description
    string arg

    The name of the argument

    Returns
    Type Description
    string

    stringValue of the command line argument passed in.

    TryGetArg(string, out string)

    Returns true if the argument was found.

    Declaration
    public static bool TryGetArg(string arg, out string argValue)
    Parameters
    Type Name Description
    string arg

    The name of the argument to look up.

    string argValue

    The argument's value, or null if not found.

    Returns
    Type Description
    bool

    true if the argument was found; otherwise false.

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