Class StagingServices
Class StagingServices.
Namespace: Unity.Industrial.Forma.Editor.UI.Service
Syntax
public static class StagingServices : object
Methods
AddStagingItem(StagingItem, IContext)
Adds the staging item.
Declaration
public static void AddStagingItem(StagingItem stagingItem, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
StagingItem | stagingItem | The staging item. |
IContext | context | The context. |
CleanUpCommands(StagingType)
Make sure everything that was loaded for editor preview purposes is unloaded. This is ran before play mode and acts as a
Declaration
public static void CleanUpCommands(StagingType stagingType)
Parameters
Type | Name | Description |
---|---|---|
StagingType | stagingType | Type of the staging. |
CreateAndAssignNewStagingItem(List<StagingItemRow>, StagingType)
Creates the and assign new staging item.
Declaration
public static StagingItemRow CreateAndAssignNewStagingItem(List<StagingItemRow> list, StagingType stagingType)
Parameters
Type | Name | Description |
---|---|---|
List<StagingItemRow> | list | The list. |
StagingType | stagingType | Type of the staging. |
Returns
Type | Description |
---|---|
StagingItemRow | StagingItemRow. |
CreateAndAssignNewStagingItem(SerializedProperty, StagingType)
Create a EnvironmentItem in Assets folder and assign it to the configurator.
Declaration
public static void CreateAndAssignNewStagingItem(SerializedProperty owner, StagingType stagingType)
Parameters
Type | Name | Description |
---|---|---|
SerializedProperty | owner | The owner. |
StagingType | stagingType | Type of the staging. |
CreateNewCommandGameObjectWithComponent(Type, SerializedProperty)
Creates the new command game object with component.
Declaration
public static Object CreateNewCommandGameObjectWithComponent(Type type, SerializedProperty property)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type. |
SerializedProperty | property | The property. |
Returns
Type | Description |
---|---|
Object | UnityEngine.Object. |
CreateNewCommandGameObjectWithComponent(Type, String, Object)
Creates the new command game object with component.
Declaration
public static GameObject CreateNewCommandGameObjectWithComponent(Type type, string propertyNameParam, Object targetObject)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type. |
String | propertyNameParam | The property name parameter. |
Object | targetObject | The target object. |
Returns
Type | Description |
---|---|
GameObject | GameObject. |
CreateStagingCmdPrefab(StagingType, StagingItem)
Creates the staging command prefab.
Declaration
public static GameObject CreateStagingCmdPrefab(StagingType stagingType, StagingItem stagingItem)
Parameters
Type | Name | Description |
---|---|---|
StagingType | stagingType | Type of the staging. |
StagingItem | stagingItem | The staging item. |
Returns
Type | Description |
---|---|
GameObject | GameObject. |
FindStagingCommand<T>(Configurator, Boolean, Boolean)
Helper function to find the first command of a specific type in the current scene of the specified configurator. If searching both enter and exit commands, enter commands are searched first.
Declaration
public static T FindStagingCommand<T>(Configurator configurator, bool searchEnterCommands, bool searchExitCommands)
where T : StagingCommand
Parameters
Type | Name | Description |
---|---|---|
Configurator | configurator | The configurator to which belongs the current scene in which we wish to find the command |
Boolean | searchEnterCommands | Whether or not to look in the enter commands |
Boolean | searchExitCommands | Whether or not to look in the exit commands |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetConfiguratorStagingItems(StagingType, IContext)
Gets the configurator staging items.
Declaration
public static List<StagingItemRow> GetConfiguratorStagingItems(StagingType stagingType, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
StagingType | stagingType | Type of the staging. |
IContext | context | The context. |
Returns
Type | Description |
---|---|
List<StagingItemRow> | List<StagingItemRow>. |
GetCurrent(IContext)
Gets the current.
Declaration
public static StagingItemRow GetCurrent(IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
IContext | context | The context. |
Returns
Type | Description |
---|---|
StagingItemRow | StagingItemRow. |
GetPersistentSettings()
Gets the persistent settings.
Declaration
public static PersistentStagingSettings GetPersistentSettings()
Returns
Type | Description |
---|---|
PersistentStagingSettings | PersistentStagingSettings. |
LoadCameraStagingItem(StagingItemCommandSettings, IContext, Boolean)
Loads the camera staging item.
Declaration
public static void LoadCameraStagingItem(StagingItemCommandSettings stagingItemCommandSettings, IContext context = null, bool forceSelection = false)
Parameters
Type | Name | Description |
---|---|---|
StagingItemCommandSettings | stagingItemCommandSettings | The staging item command settings. |
IContext | context | The context. |
Boolean | forceSelection |
LoadCameraStagingItem(StagingItem, IContext)
Loads the camera staging item.
Declaration
public static void LoadCameraStagingItem(StagingItem stagingItem, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
StagingItem | stagingItem | The staging item. |
IContext | context | The context. |
LoadSceneStagingItem(StagingItemCommandSettings, IContext)
Loads the scene staging item.
Declaration
public static void LoadSceneStagingItem(StagingItemCommandSettings stagingItemCommandSettings, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
StagingItemCommandSettings | stagingItemCommandSettings | The staging item command settings. |
IContext | context | The context. |
LoadSceneStagingItem(StagingItem, IContext)
Loads the scene staging item.
Declaration
public static void LoadSceneStagingItem(StagingItem stagingItem, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
StagingItem | stagingItem | The staging item. |
IContext | context | The context. |
RemoveStagingItem(StagingItemRow, IContext)
Removes the staging item.
Declaration
public static void RemoveStagingItem(StagingItemRow stagingItemRow, IContext context = null)
Parameters
Type | Name | Description |
---|---|---|
StagingItemRow | stagingItemRow | The staging item row. |
IContext | context | The context. |
SetNewActiveEnvironmentProfile(ConfiguratorProfile)
Sets the new active environment profile.
Declaration
public static async Task SetNewActiveEnvironmentProfile(ConfiguratorProfile configuratorProfile)
Parameters
Type | Name | Description |
---|---|---|
ConfiguratorProfile | configuratorProfile | The configurator profile. |
Returns
Type | Description |
---|---|
Task | IEnumerator. |
UnloadCurrentStagingItem()
Unloads the current staging item.
Declaration
public static void UnloadCurrentStagingItem()