docs.unity3d.com
    Show / Hide Table of Contents

    Assembling Configurator Architecture

    This information is for developers who want to assemble the different Configurator components as they are structured in the Unity Editor. Getting familiar with the Configurator architecture is useful if you need to better understand the technical details of how the components work together.

    Forma is designed to help creators set up Configurators more quickly using a simplified interface (the Forma interface). Building a Configurator in the Unity Editor by assembling the hierarchy manually is more time consuming, but useful to developers who need to support creators in Forma.

    Creating a Configurator Manually

    To create a Configurator, follow these steps:

    1. In the Editor, add an empty GameObject to your Scene and name it Configurator.

    2. Add a Configurator component to the GameObject.
      Adding a Configurator component to the GameObject


      When you add a Configurator component to the GameObject, the following are also added by default:

      • a State Conductor component
      • a Product Preview component
      • a StagingManager GameObject (as a direct child)
        Contains a StagingManager component.
        Hierarchy after you add the Configurator component

    Creating Configurator Settings

    To create Configurator settings, follow these steps:

    1. Add a Configurator Settings component to the Configurator GameObject.
      Note: By default, Provider Engine properties in the Configurator Settings component contain default values or links to Prefabs with default Provider Engines.
    2. In the Configurator component, select Configurator > Settings to create a link to the Configurator Settings component.
      Creating a link to the Configurator Settings component automatically links the Spawn Point property of the Configurator GameObject to the SpawnPoint GameObject. It also adds the following child GameObjects to the Configurator GameObject:

      • Switcher
        Contains a Switcher component
      • ConfigurationManager
        Contains a ConfigurationManager component and the following child GameObject:
        • CurrentConfiguration
          Contains a CurrentConfiguration component.
      • Spawn Point
      • IRuleEngine
        Contains a component that the Provider Engines property references under the Configurator Settings GameObject.
      • IPricingEngine
        Contains a component that the Provider Engines property references under the Configurator Settings GameObject.
      • IInfoEngine
        Contains a component that the Provider Engines property references under the Configurator Settings GameObject.
        Configurator Settings component hierarchy

    Creating a Product that is compatible with the Configurator

    To create a product that will be compatible with Unity Forma, follow these steps:

    1. Add an empty GameObject and give it a recognizable name. For example, Configurable Product.
    2. Add your Product Prefab (the Prefab that includes your CAD model) as a child of the Configurable Product GameObject.
    3. Drag your Configurable Product GameObject into the Project window to make it a GameObject Prefab.
    4. Remove the Configurable Product prefab from the scene hierarchy.
    5. Open the Profiles Window from Forma -> Profile Settings in the top bar menu.
    6. Set the selection to Products.
    7. From your Project window, drag the Configurable Product GameObject prefab into the right hand subwindow. This will automatically create a product for the Configurable Product and add it to the active profile. If you have Autoload enabled in the Product Preview component, the new product will be loaded into your scene.

    Instantiating the Product Without Profiles

    1. Select the Configurator GameObject and add a Mixed Product Source component.
    2. In the Inspector, go to Configurator Settings > Product Sources and select +.
      Element 0 appears in the list.
    3. Link the new Element 0 to the Mixed Product Source component.
    4. In the Mixed Product Source > Product Prefabs, select +. A new element appears in the list.
    5. Link the Product to the new element in the Mixed Product Source.
    6. If Auto Load is enabled for Product Preview of the Configurator component, the system instantiates the Configurable Product Prefab in your current Scene under Configurator > Spawn Point > Product Spawn Point. Otherwise, use the Product Previews dropdown button and select the added product.
    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