Interactions
Interactions are predefined functions defined in the backend (Unity) that allow changes to be made to a product/visualization.
Creating Interactions
Using the "Create" button within the CRUD component, a new Interaction can be created. Existing Interactions can be edited or viewed using the "Inline Icons".
These interactions enable backend functions (in Unity) to be called/executed. → For example, changing the material color of a 3D object.
-
Code (mandatory) → Technical name of the Interaction. This can be freely chosen but should adhere to general nomenclature and must be unique within the Interactions.
-
ActionName (mandatory) → Definition of an action. Actions are functions in the backend that can be applied at various points in 3D customization. → For example, "ChangeColor"
-
Descriptions (optional) → Description of the Interaction, in "n" languages
- de_de = Farbe wechseln (Change Color)
- en_en = Change Color
- ...
Clicking "Create" opens the capture dialog for a new Interaction. Alternatively, an already defined Interaction can be viewed or edited.
- Define "Code".
- Assign "ActionName".
- The "Description" can be captured in multiple languages if needed.
- Save → Create the new Interaction.
- Save → Save the changes.
Interaction-Parameters
InteractionParameters allow additional parameters to be passed to backend functions (Unity). → For example, the name of a fixed texture that should always be assigned during execution.
Important: InteractionParameters maintained directly in an Interaction are globally valid and are set every time the Interaction is called. In contrast, context-specific InteractionParameters (e.g., CharacteristicInteractionParameter) are context-specific and are only set when the Interaction is executed in relation to the corresponding Characteristic.
-
Code (mandatory) → Technical name of the InteractionParameter. This can be freely chosen but should adhere to general nomenclature and must be unique within the InteractionParameters.
-
Type (mandatory)
- Choice → Currently, only the Choice type exists, which sets a value in a backend function.
-
Parameter (mandatory) → This is the value passed to the respective backend function (e.g., "Logo").
-
Description (optional) → Description of the InteractionParameter, in "n" languages
- de_de = Reference 01
- en_en = Reference 01
- ...
InteractionParameters can be assigned to Interactions here.
- Clicking "Create" opens the capture dialog for a new InteractionParameter. Alternatively, an already defined InteractionParameter can be viewed or edited.
- Define "Type".
- Assign parameters.
- The "Description" can be captured in multiple languages if needed.
- Save → Create the new InteractionParameters.
- Save → Save the changes.
Multiple InteractionParameters can be assigned to one Interaction.
Interaction Types
ChangeColor
The color of a GameObject is changed. The specific color is determined by the corresponding Choice.
- Important: The value must currently be executed as a HEX code (e.g., “#FF00FF”).
- It is also possible to define the transparency of the alpha channel by adding two additional digits to the HEX code (e.g., “#FF00FF71”).
- “00” (corresponds to fully transparent) - “FF” (not transparent).
Necessary InteractionParameter Types:
- Choice
- This parameter specifies which Characteristic/Choice this interaction should respond to. Important: The value must exactly match the name of a prefab in the relevant Addressables.
- GameObjectName
- This parameter specifies which mesh within the relevant ObjectInformation the interaction should be assigned to, or which mesh should adopt the color. Important: The path to the relevant mesh (relative to the relevant ObjectInformation) must be provided.
- e.g., → Folder01/Sub-Folder02/MeshName
- This parameter specifies which mesh within the relevant ObjectInformation the interaction should be assigned to, or which mesh should adopt the color. Important: The path to the relevant mesh (relative to the relevant ObjectInformation) must be provided.
ChangePrefab
Loads and spawns GameObjects from the addressables where the name matches the current choice.
Necessary InteractionParameter Types:
- Choice
- This parameter specifies which Characteristic/Choice this interaction should respond to.
Important: The value must exactly match the name of a prefab in the relevant Addressables.
- This parameter specifies which Characteristic/Choice this interaction should respond to.
- CodeParameterPair
- Code: PrefabContainerPath
- This parameter specifies the path where the empty container should be created, in which the GameObjects will be spawned (relative to the relevant ObjectInformation).
- Code: DefaultPrefab (OPTIONAL)
- This parameter specifies the name of the prefab to be displayed when no choice is available.
- Code: PrefabContainerPosition (OPTIONAL | Default = “0;0;0;”)
- This parameter specifies the position for the container in the format “x;y;z”.
Important: Use the “period as a decimal separator”.
- This parameter specifies the position for the container in the format “x;y;z”.
- Code: PrefabContainerRotation (OPTIONAL | Default = “0;0;0;”)
- This parameter specifies the rotation for the container in the format “x;y;z”.
Important: Use the “period as a decimal separator”.
- This parameter specifies the rotation for the container in the format “x;y;z”.
- Code: PrefabContainerScale (OPTIONAL | Default = “1;1;1;”)
- This parameter specifies the scale for the container in the format “x;y;z”.
Important: Use the “period as a decimal separator”.
- This parameter specifies the scale for the container in the format “x;y;z”.
- Code: PrefabContainerPath
ChangeVisibility
An interaction that shows/hides a GameObject (within the relevant ObjectInformation) if the name matches the current choice. If the choice deviates from the name, the GameObject is hidden.
Necessary InteractionParameter Types:
- Choice
- This parameter specifies which Characteristic/Choice this interaction should respond to.
Important: The value must exactly match the name of a GameObject in the relevant ObjectInformation.
- This parameter specifies which Characteristic/Choice this interaction should respond to.
- GameObjectName
- This parameter specifies which GameObject within the relevant ObjectInformation the interaction should be assigned to.
Important: The path to the relevant mesh (relative to the relevant ObjectInformation) must be provided.- e.g., → Folder01/Sub-Folder02/MeshName
- This parameter specifies which GameObject within the relevant ObjectInformation the interaction should be assigned to.