Class AUnityConfiguration
Use this class to create configuration that have to execute code in Unity's thread You need to call the base constructor when inheriting this class and implement the SafeReset (optional) and SafeConfigure (mandatory) methods
Inherited Members
Namespace: Xareus.Scenarios.Unity
Assembly: Xareus.Scenarios.Unity.dll
Syntax
public abstract class AUnityConfiguration : AConfiguration
Constructors
AUnityConfiguration(ASequence, Dictionary<string, Parameter>, ContextHolder)
Declaration
protected AUnityConfiguration(ASequence sequence, Dictionary<string, Parameter> parameters, ContextHolder contexts)
Parameters
Type | Name | Description |
---|---|---|
ASequence | sequence | |
Dictionary<string, Parameter> | parameters | |
ContextHolder | contexts |
Methods
Configure()
Configure() This method is called when the sequence that contains this configuration function receives a token. If the scenario is running in a thread different from Unity's thread, SafeConfigure() will be called.
Declaration
public override sealed IContext Configure()
Returns
Type | Description |
---|---|
IContext |
Overrides
FillParameters()
Override the base method as we need to execute this in the Unity thread
Declaration
public override void FillParameters()
Overrides
Reset()
Declaration
public override void Reset()
Overrides
SafeConfigure()
This method is called when the sequence that contains this configuration function receives a token. Note that this code will be executed in unity's thread
Declaration
public abstract IContext SafeConfigure()
Returns
Type | Description |
---|---|
IContext |
SafeReset()
Reset the configuration function. Note that this code will be executed in unity's thread and the declared parameters (using the ConfigurationParameter attribute) are already filled
Declaration
public virtual void SafeReset()
UnityThreadFillParameters()
Declaration
protected void UnityThreadFillParameters()