Class Configuration
Configuration class for application. Access to app params and other simulation configuration data.
Inherited Members
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
public class Configuration
Fields
SimulationConfig
Accessor for the simulation configuration.
Declaration
public Configuration.SimulationConfiguration SimulationConfig
Field Value
| Type | Description |
|---|---|
| Configuration.SimulationConfiguration |
Properties
Instance
Singleton accessor.
Declaration
public static Configuration Instance { get; }
Property Value
| Type | Description |
|---|---|
| Configuration |
localPersistentDataPath
Get or set the persistent data path when running locally. This property has no effect, when running in the cloud.
Declaration
public static string localPersistentDataPath { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetAppParams<T>()
Returns the AppParams of custom type T
Declaration
public T GetAppParams<T>()
Returns
| Type | Description |
|---|---|
| T | AppParam of type T |
Type Parameters
| Name | Description |
|---|---|
| T | The type of AppParam |
GetAttemptId()
Returns the attemptId of the simulation run.
Declaration
public string GetAttemptId()
Returns
| Type | Description |
|---|---|
| string | string of attemptId |
GetInstanceId()
Returns the id of the instance on which the simulation is currently running.
Declaration
public string GetInstanceId()
Returns
| Type | Description |
|---|---|
| string | string of instanceId |
GetStorageBasePath()
Returns the base storage path for the data storage in the cloud. It defaults to the Application persistent data path.
Declaration
public string GetStorageBasePath()
Returns
| Type | Description |
|---|---|
| string | string of the storagePath |
GetStorageBasePathOther()
Returns the non-artifact base storage path for the data storage in the cloud. It defaults to the Application persistent data path.
Declaration
public string GetStorageBasePathOther()
Returns
| Type | Description |
|---|---|
| string | string of the non-artifact storagePath |
GetStoragePath()
Returns the full path for the storage which contains base path and the attemptId
Declaration
public string GetStoragePath()
Returns
| Type | Description |
|---|---|
| string | string of full storage path |
GetStoragePathOther()
Returns the full path for the storage which contains base path and the attemptId, for non-artifacts
Declaration
public string GetStoragePathOther()
Returns
| Type | Description |
|---|---|
| string | string of full storage path for non-artifacts |
IsSimulationRunningInCloud()
Returns if the simulation is running in cloud or not.
Declaration
public bool IsSimulationRunningInCloud()
Returns
| Type | Description |
|---|---|
| bool | boolean indicating if simulation is running in cloud |