Class ScenarioBase
The base class of all scenario classes
Inherited Members
Namespace: UnityEngine.Experimental.Perception.Randomization.Scenarios
Assembly: solution.dll
Syntax
public abstract class ScenarioBase : MonoBehaviour
Fields
Name | Description |
---|---|
deserializeOnStart | When true, this scenario will deserializes constants from a Json file before it begins executing |
quitOnComplete | If true, this scenario will quit the Unity application when it's finished executing |
serializedConstantsFileName | The name of the Json file this scenario's constants are serialized to/from. |
Properties
Name | Description |
---|---|
ActiveScenario | Returns the active parameter scenario in the scene |
currentIteration | The current iteration index of the scenario |
currentIterationFrame | The number of frames that have elapsed since the current scenario iteration was Setup |
framesSinceInitialization | The number of frames that have elapsed since the scenario was initialized |
isIterationComplete | Returns whether the current scenario iteration has completed |
isScenarioComplete | Returns whether the entire scenario has completed |
serializedConstantsFilePath | Returns the file location of the JSON serialized constants |
Methods
Name | Description |
---|---|
Deserialize() | Deserializes constants saved in a JSON file located at serializedConstantsFilePath |
OnComplete() | Called when the scenario has finished iterating |
OnFrameStart() | Called at the start of every frame |
OnInitialize() | Called before the scenario begins iterating |
OnIterationSetup() | Called at the beginning of every scenario iteration |
OnIterationTeardown() | Called the frame after an iteration ends |
Serialize() | Serializes the scenario's constants to a JSON file located at serializedConstantsFilePath |