docs.unity3d.com
    Show / Hide Table of Contents

    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.

    Inheritance
    Object
    Switcher
    Namespace: Unity.Industrial.Forma.Core
    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.

    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.

    SwitchFeature(FeatureSet, Feature, Configuration)

    Switches the feature.

    Declaration
    public static void SwitchFeature(FeatureSet featureSet, Feature feature, Configuration configuration)
    Parameters
    Type Name Description
    FeatureSet featureSet

    The feature set.

    Feature feature

    The feature.

    Configuration configuration

    The configuration that contains the feature switched. Set to null to prevent applied update

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023