Class Switcher
The switcher is responsible for actually changing the appearance of the model and scene according to a changed configuration or new staging settings. Once a configuration has been validated on the marketing level, it needs to be translated and executed at the product level. The Switcher will use the Variant Table of the currently active model to translate the configuration to a set of assignments. It will then execute each assignment, thus changing the appearance of the model by activating/deactivating geometry, assigning materials, playing animations, etc.
Inherited Members
Namespace: UnityEngine.Industrial.Configuring.ConfiguratorRuntime
Syntax
public class Switcher : MonoBehaviour
Methods
SwitchConfiguration(IReadOnlyConfiguration, VerifiedConfigurationChange, ConfigurationManager)
Switches to the given configuration, i.e, changes the selected features in the feature sets and executes the assignments.
Declaration
public void SwitchConfiguration(IReadOnlyConfiguration configuration, VerifiedConfigurationChange verifiedConfigurationChange, ConfigurationManager configurationManager)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyConfiguration | configuration | The configuration. |
VerifiedConfigurationChange | verifiedConfigurationChange | The verified configuration change. |
ConfigurationManager | configurationManager | The configuration manager. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | configuration |
SwitchConfiguration(VerifiedConfigurationChange, ConfigurationManager)
Switches to the current configuration as defined in the configuration manager.
Declaration
public void SwitchConfiguration(VerifiedConfigurationChange verifiedConfigurationChange, ConfigurationManager configurationManager)
Parameters
Type | Name | Description |
---|---|---|
VerifiedConfigurationChange | verifiedConfigurationChange | The verified configuration change. |
ConfigurationManager | configurationManager | The configuration manager. |
SwitchFeature(FeatureSet, Feature)
Switches the feature.
Declaration
public static void SwitchFeature(FeatureSet featureSet, Feature feature)
Parameters
Type | Name | Description |
---|---|---|
FeatureSet | featureSet | The feature set. |
Feature | feature | The feature. |