Class Configurator
The configurator is the top-level layer of the architecture, containing references to runtime components (ConfigurationManager, Switcher), the Product data core model, settings for choosing providers and staging settings shared by multiple products.
Inherited Members
Namespace: UnityEngine.Industrial.Configuring.ConfiguratorRuntime
Syntax
[ExecuteInEditMode]
public class Configurator : MonoBehaviour
Fields
ProductSpawnPointObjectName
The product spawn point object name
Declaration
public const string ProductSpawnPointObjectName = "Product Spawn Point"
Field Value
Type | Description |
---|---|
String |
s_ConfiguratorInstance
The s configurator instance
Declaration
public static Configurator s_ConfiguratorInstance
Field Value
Type | Description |
---|---|
Configurator |
splashscreen
The splashscreen
Declaration
[HideInInspector]
public Splashscreen splashscreen
Field Value
Type | Description |
---|---|
Splashscreen |
Properties
ActiveProfile
Gets the active profile.
Declaration
public ConfiguratorProfile ActiveProfile { get; }
Property Value
Type | Description |
---|---|
ConfiguratorProfile | The active profile. |
analyticsEngine
Gets the analytics engine.
Declaration
public IAnalyticsEngine analyticsEngine { get; }
Property Value
Type | Description |
---|---|
IAnalyticsEngine | The analytics engine. |
configurationManager
Reference to the configuration manager.
Declaration
public ConfigurationManager configurationManager { get; }
Property Value
Type | Description |
---|---|
ConfigurationManager | The configuration manager. |
currentContext
Current context.
Declaration
public Context currentContext { get; }
Property Value
Type | Description |
---|---|
Context | The current context. |
CurrentLoadableProductPrefab
Gets the current loadable product prefab.
Declaration
public AssetProductReference CurrentLoadableProductPrefab { get; }
Property Value
Type | Description |
---|---|
AssetProductReference | The current loadable product prefab. |
CurrentProduct
Gets the current product.
Declaration
public Product CurrentProduct { get; }
Property Value
Type | Description |
---|---|
Product | The current product. |
CurrentProductIndex
Gets the index of the current product.
Declaration
public int CurrentProductIndex { get; }
Property Value
Type | Description |
---|---|
Int32 | The index of the current product. |
CurrentScene
Gets the current scene.
Declaration
public StagingElement CurrentScene { get; }
Property Value
Type | Description |
---|---|
StagingElement | The current scene. |
ExportProfiles
Gets the export profiles.
Declaration
public List<BuildProfile> ExportProfiles { get; }
Property Value
Type | Description |
---|---|
List<BuildProfile> | The export profiles. |
firstContext
Gets the first context.
Declaration
public Context firstContext { get; }
Property Value
Type | Description |
---|---|
Context | The first context. |
globalStagingSettings
Reference to the global StagingSettings
Declaration
public StagingSettings globalStagingSettings { get; }
Property Value
Type | Description |
---|---|
StagingSettings | The global staging settings. |
infoEngine
Gets the information engine.
Declaration
public IInfoEngine infoEngine { get; }
Property Value
Type | Description |
---|---|
IInfoEngine | The information engine. |
pricingEngine
Gets the pricing engine.
Declaration
public IPricingEngine pricingEngine { get; }
Property Value
Type | Description |
---|---|
IPricingEngine | The pricing engine. |
Products
Gets the products.
Declaration
public IEnumerable<AssetProductReference> Products { get; }
Property Value
Type | Description |
---|---|
IEnumerable<AssetProductReference> | The products. |
ProfileDefinition
Gets the profile definition.
Declaration
public ProfileDefinition ProfileDefinition { get; }
Property Value
Type | Description |
---|---|
ProfileDefinition | The profile definition. |
ruleEngine
Reference to the rule engine (internal reference).
Declaration
public IRuleEngine ruleEngine { get; }
Property Value
Type | Description |
---|---|
IRuleEngine | The rule engine. |
runtimeUI
Runtime UI component if, enabled from configurator settings
Declaration
public ProductRuntimeUI runtimeUI { get; }
Property Value
Type | Description |
---|---|
ProductRuntimeUI | The runtime UI. |
settings
Settings of this configurator.
Declaration
public ConfiguratorSettings settings { get; set; }
Property Value
Type | Description |
---|---|
ConfiguratorSettings | The settings. |
SpawnPoint
Gets the spawn point.
Declaration
public GameObject SpawnPoint { get; }
Property Value
Type | Description |
---|---|
GameObject | The spawn point. |
stagingManager
Reference to the Staging Manager
Declaration
public StagingManager stagingManager { get; }
Property Value
Type | Description |
---|---|
StagingManager | The staging manager. |
stateConductor
Gets the state conductor.
Declaration
public StateConductor stateConductor { get; }
Property Value
Type | Description |
---|---|
StateConductor | The state conductor. |
switcher
Reference switcher that carries out the actual switching on the model.
Declaration
public Switcher switcher { get; }
Property Value
Type | Description |
---|---|
Switcher | The switcher. |
Methods
CreateSplashScreen()
Creates the splash screen.
Declaration
public void CreateSplashScreen()
GetProductSpawnPoint()
Gets the product spawn point.
Declaration
public GameObject GetProductSpawnPoint()
Returns
Type | Description |
---|---|
GameObject | GameObject. |
InitConfigurator()
Initializes the configurator.
Declaration
public Coroutine InitConfigurator()
Returns
Type | Description |
---|---|
Coroutine | Coroutine. |
InstantiateProviders()
Instantiates the providers.
Declaration
public void InstantiateProviders()
IsSplashscreenDefined()
Determines whether [is splashscreen defined].
Declaration
public bool IsSplashscreenDefined()
Returns
Type | Description |
---|---|
Boolean |
|
PostInit(Action)
Posts the initialize.
Declaration
public void PostInit(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | The action. |
ReloadProviders()
Reloads the providers.
Declaration
public void ReloadProviders()
RemoveProduct(Int32, Boolean)
Removes the product.
Declaration
public void RemoveProduct(int productIndex, bool unloadProduct = true)
Parameters
Type | Name | Description |
---|---|---|
Int32 | productIndex | Index of the product. |
Boolean | unloadProduct | if set to |
ResetConfigurator()
Resets the configurator.
Declaration
public void ResetConfigurator()
ResetProductPosition()
Resets the product position.
Declaration
public void ResetProductPosition()
ResetSpawnPoint()
Resets the spawn point.
Declaration
[ContextMenu("Reset Spawn Point")]
public void ResetSpawnPoint()
SetContext(Context)
Sets the current context.
Declaration
public void SetContext(Context context)
Parameters
Type | Name | Description |
---|---|---|
Context | context | The context. |
Remarks
The context must not be
null
and must be part of
the context collection of the current product (which must be set).
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The context must not be null. |
InvalidOperationException | There is no current product: cannot set context. |
ArgumentException | The current product does not contain the context. |
TryUnloadCurrentProduct()
Tries the unload current product.
Declaration
public void TryUnloadCurrentProduct()
UnloadContext()
Unloads the context.
Declaration
public void UnloadContext()
UnloadCurrentProduct()
Unloads the current product.
Declaration
public void UnloadCurrentProduct()
ValidateStaging()
Validates the staging.
Declaration
[ContextMenu("Validate Staging")]
public void ValidateStaging()
Events
anyConfiguratorChanged
Occurs when [any configurator changed].
Declaration
public static event Action<ConfiguratorChangeArgs> anyConfiguratorChanged
Event Type
Type | Description |
---|---|
Action<ConfiguratorChangeArgs> |
contextChanged
Raised when the context of the product has been changed.
Declaration
public event ContextChangedHandler contextChanged
Event Type
Type | Description |
---|---|
ContextChangedHandler |
settingsChanged
Occurs when [settings changed].
Declaration
public event SettingsChanged settingsChanged
Event Type
Type | Description |
---|---|
SettingsChanged |