Class Config
Configuration class that provides for various helper properties.
Namespace: Unity.Simulation.Client
Syntax
public static class Config
Fields
kDefaultAPIProtocol
The default API protocol to use.
Declaration
public const string kDefaultAPIProtocol = "https"
Field Value
| Type | Description |
|---|---|
| String |
kDefaultAPITimeout
The default API timeout in seconds.
Declaration
public const int kDefaultAPITimeout = 7200
Field Value
| Type | Description |
|---|---|
| Int32 |
kDefaultRedirectUriPort
The default port to listen to for the auth redirect response.
Declaration
public const ushort kDefaultRedirectUriPort = 57242
Field Value
| Type | Description |
|---|---|
| UInt16 |
Properties
apiEndpoint
The endpoint to use communicating with the Unity Simulation service.
Declaration
public static string apiEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| String |
apiHost
Declaration
public static string apiHost { get; }
Property Value
| Type | Description |
|---|---|
| String |
apiProtocol
The API protocol to use communication with Unity Simulation service.
Declaration
public static string apiProtocol { get; }
Property Value
| Type | Description |
|---|---|
| String |
confDir
The configuration directory for the current user.
Declaration
public static string confDir { get; }
Property Value
| Type | Description |
|---|---|
| String |
configurationFile
The configuration file for the Unity Simulation service.
Declaration
public static string configurationFile { get; }
Property Value
| Type | Description |
|---|---|
| String |
homeDir
The home directory for the current user.
Declaration
public static string homeDir { get; }
Property Value
| Type | Description |
|---|---|
| String |
projectFile
The file used to persist the active project id.
Declaration
public static string projectFile { get; }
Property Value
| Type | Description |
|---|---|
| String |
timeoutSecs
The timeout in seconds for Unity Simulation service requests.
Declaration
public static int timeoutSecs { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
token
Returns the instantiated token from the token file.
Declaration
public static Token token { get; }
Property Value
| Type | Description |
|---|---|
| Token |
tokenFile
The token file used to persist the auth and refresh tokens.
Declaration
public static string tokenFile { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
Bootstrap()
If Unity Simulation has never run, you can use this to generate the first time data needed to run.
Declaration
public static void Bootstrap()
Refresh()
Refreshes the auth token.
Declaration
public static void Refresh()