Class Scenario<T>
The base class of scenarios with serializable constants
Inherited Members
Namespace: UnityEngine.Perception.Randomization.Scenarios
Assembly: solution.dll
Syntax
public abstract class Scenario<T> : ScenarioBase where T : ScenarioConstants, new()
Type Parameters
Name | Description |
---|---|
T | The type of scenario constants to serialize |
Fields
Name | Description |
---|---|
constants | A construct containing serializable constants that control the execution of this scenario |
Properties
Name | Description |
---|---|
genericConstants | Returns this scenario's non-typed serialized constants |
Methods
Name | Description |
---|---|
DeserializeFromFile(string) | Overwrites this scenario's randomizer settings and scenario constants using a configuration file located at the provided file path |
DeserializeFromJson(string) | Overwrites this scenario's randomizer settings and scenario constants from a JSON serialized configuration |
SerializeToJson() | Serializes the scenario's constants and randomizer settings to a JSON string |