Class StagingManager
Class StagingManager.
Inherited Members
Namespace: Unity.Industrial.Forma.Staging
Syntax
[MovedFrom(true, "UnityEngine.Industrial.Configuring.ConfiguratorRuntime", "Unity.Industrial.Configurator", null)]
[ExecuteInEditMode]
public class StagingManager : MonoBehaviour
Properties
configurator
Gets the configurator.
Declaration
public Configurator configurator { get; }
Property Value
| Type | Description |
|---|---|
| Configurator | The configurator. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The StagingManager must be child to a GameObject with a Configurator component. |
configuratorInternal
Gets the configurator internal.
Declaration
public Configurator configuratorInternal { get; }
Property Value
| Type | Description |
|---|---|
| Configurator | The configurator internal. |
currentCamera
Get the current camera.
Declaration
public StagingElement currentCamera { get; }
Property Value
| Type | Description |
|---|---|
| StagingElement | The current camera. |
currentEnvironment
Get the current environment.
Declaration
public StagingElement currentEnvironment { get; }
Property Value
| Type | Description |
|---|---|
| StagingElement | The current environment. |
currentEvent
Current event
Declaration
public StagingElement currentEvent { get; }
Property Value
| Type | Description |
|---|---|
| StagingElement |
currentLight
Current light
Declaration
public StagingElement currentLight { get; }
Property Value
| Type | Description |
|---|---|
| StagingElement |
currentRuntimeStagingSettings
Reference to the current stagingSetting that is created from the global and local settings
Declaration
public RuntimeStagingSettings currentRuntimeStagingSettings { get; }
Property Value
| Type | Description |
|---|---|
| RuntimeStagingSettings | The current runtime staging settings. |
IsBusy
Gets a value indicating whether this instance is busy.
Declaration
public bool IsBusy { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
Methods
ClearCurrentScene(Boolean)
Clears the current scene.
Declaration
public void ClearCurrentScene(bool keepCurrentAsPreview = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | keepCurrentAsPreview | if set to |
ConnectToConfigurationManager()
Connects to configuration manager.
Declaration
public void ConnectToConfigurationManager()
EnterEnvironmentAsync(StagingElement)
Loads the environment by running the Enter commands on each staging items. You need to await when calling this method or else it will be run asynchronously.
Declaration
public async Task EnterEnvironmentAsync(StagingElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| StagingElement | element |
Returns
| Type | Description |
|---|---|
| Task | Task |
ExitEnvironmentAsync()
Unloads the environment by running the Exit commands on each staging items. You need to await when calling this method or else it will be run asynchronously.
Declaration
public async Task ExitEnvironmentAsync()
Returns
| Type | Description |
|---|---|
| Task | Task |
GetCameras()
Get all cameras
Declaration
public IReadOnlyList<StagingItemRow> GetCameras()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<StagingItemRow> | IReadOnlyList<StagingItemRow>. |
GetEnvironmentItems()
All Scenes of the current StagingSettings
Declaration
public IReadOnlyList<StagingItemRow> GetEnvironmentItems()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<StagingItemRow> | IReadOnlyList<StagingItemRow>. |
GetLights()
Get all lights
Declaration
[Obsolete]
public IReadOnlyList<StagingElement> GetLights()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<StagingElement> | IReadOnlyList<StagingElement>. |
LoadScene(String)
Try load the scene for the given id
Declaration
public bool LoadScene(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| String | id | The identifier. |
Returns
| Type | Description |
|---|---|
| Boolean | Is available |
LoadScene(StagingElement)
Load the scene for the given element
Declaration
public object LoadScene(StagingElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| StagingElement | element | The element. |
Returns
| Type | Description |
|---|---|
| Object | System.Object. |
OnDisable()
Called when [disable].
Declaration
public void OnDisable()
OnEnable()
Called when [enable].
Declaration
public void OnEnable()
RemoveCurrentCamera()
Removes the current camera.
Declaration
public void RemoveCurrentCamera()
SelectCamera(String, Boolean)
Selects the camera with a given index
Declaration
public bool SelectCamera(string id, bool forceUpdate = false)
Parameters
| Type | Name | Description |
|---|---|---|
| String | id | The identifier. |
| Boolean | forceUpdate | Force running the enter and exit commands even if the item is already active. |
Returns
| Type | Description |
|---|---|
| Boolean | Is available |
SelectCamera(StagingElement, Boolean)
Activates the camera
Declaration
public void SelectCamera(StagingElement cameraElement, bool forceUpdate = false)
Parameters
| Type | Name | Description |
|---|---|---|
| StagingElement | cameraElement | The element. |
| Boolean | forceUpdate | Force running the enter and exit commands even if the item is already active. |
SelectCameraAsync(StagingElement, Boolean)
Activates the camera. You need to await when calling this method or else it will be run asynchronously.
Declaration
public async Task SelectCameraAsync(StagingElement cameraElement, bool forceUpdate = false)
Parameters
| Type | Name | Description |
|---|---|---|
| StagingElement | cameraElement | The element. |
| Boolean | forceUpdate | Force running the enter and exit commands even if the item is already active. |
Returns
| Type | Description |
|---|---|
| Task | Task |
SelectLight(String)
Select the light with the given id
Declaration
[Obsolete]
public void SelectLight(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| String | id | The identifier. |
SelectLight(StagingElement)
Select the light with the given StagingElement
Declaration
[Obsolete]
public void SelectLight(StagingElement lightStagingElement)
Parameters
| Type | Name | Description |
|---|---|---|
| StagingElement | lightStagingElement | The staging element. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The Light " + stagingElement + " is not included in the current StagingSettings. |
SelectLightAsync(StagingElement)
Select the light with the given StagingElement You need to await when calling this method or else it will be run asynchronously.
Declaration
public async Task SelectLightAsync(StagingElement lightStagingElement)
Parameters
| Type | Name | Description |
|---|---|---|
| StagingElement | lightStagingElement | The staging element. |
Returns
| Type | Description |
|---|---|
| Task | Task |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The Light " + stagingElement + " is not included in the current StagingSettings. |
UnloadCurrentEnvironmentAsync()
Return unloading coroutine that will need to be yielded to
Declaration
public async Task UnloadCurrentEnvironmentAsync()
Returns
| Type | Description |
|---|---|
| Task | IEnumerator. |
UnloadCurrentStaging(Action)
Start unloading immediately
Declaration
public Coroutine UnloadCurrentStaging(Action callback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | callback | The callback. |
Returns
| Type | Description |
|---|---|
| Coroutine | Coroutine. |
UnloadCurrentStagingAsync()
Return unloading coroutine that will need to be yielded to
Declaration
public IEnumerator UnloadCurrentStagingAsync()
Returns
| Type | Description |
|---|---|
| IEnumerator | IEnumerator. |
Events
loadEnvironmentFinished
Raised when the environment switch is finished. Verify the value of the SwitchStagingElementArgs's enter field value to know if Entering or Exiting the environment.
Declaration
public event SwitchStagingElementFinishedHandler loadEnvironmentFinished
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementFinishedHandler |
loadEnvironmentStarted
Raised when the environment is starting to be switched. Verify the value of the SwitchStagingElementArgs's enter field value to know if Entering or Exiting the environment.
Declaration
public event SwitchStagingElementStartedHandler loadEnvironmentStarted
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementStartedHandler |
stagingChanged
Raised when the StagingSettings has changed
Declaration
public event StagingSettingsChangedHandler stagingChanged
Event Type
| Type | Description |
|---|---|
| StagingSettingsChangedHandler |
switchCameraFinished
Raised when the camera is switched
Declaration
public event SwitchStagingElementFinishedHandler switchCameraFinished
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementFinishedHandler |
switchCameraStarted
Raised when the camera is switching
Declaration
public event SwitchStagingElementStartedHandler switchCameraStarted
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementStartedHandler |
switchEventFinished
Raised when an event is switched
Declaration
public event SwitchStagingElementFinishedHandler switchEventFinished
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementFinishedHandler |
switchEventStarted
Raised when an event is started
Declaration
public event SwitchStagingElementStartedHandler switchEventStarted
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementStartedHandler |
switchLightFinished
Raised when the Light is switched
Declaration
public event SwitchStagingElementFinishedHandler switchLightFinished
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementFinishedHandler |
switchLightStarted
Raised when the Light is switching
Declaration
public event SwitchStagingElementStartedHandler switchLightStarted
Event Type
| Type | Description |
|---|---|
| SwitchStagingElementStartedHandler |