2D UI Actors Migration

There are a few changes between the first and second generation of UI actors.

See Also
About 2D UI Actors
Creating 2D UI Actors
Editing 2D UI Actors

Two types of 2D UI actors are available in the app:

  • First generation of UI actors (before R2022x FD01 (FP.2205)): these actors are still supported but deprecated. This means that you can still use them in your experience but you can no longer create them. The JavaScript API for these actors is also deprecated.
  • Second generation of UI actors (from R2022x FD01 (FP.2205) onward): this type of 2D UI actors is consistent with 3D UI actors. Moreover, there is a dedicated section for each 2D UI actor in the JavaScript guide. This new generation of UI actors adds more controls to the JavaScript SDK.

    These new actors share most of the same properties with the first generation of UI actors.

In the following table, you can find the impacted actors and how their properties differ.

Types of Actors Properties (before R2022x FD01 (FP.2205)) Properties (from R2022x FD01 (FP.2205) onward)
2D Text Color Text Color
Font Height Font Size
2D Button Font Height Font Size
2D Image Button

This new actor is the 2D equivalent of the 3D image button actor.

It shares the same general, layout, and rendering properties as other 2D UI actors.

For more information about these properties, see 2D Image Button Properties.

Note: If there is no image resource in the scene when you create a 2D image button actor, images are automatically created under the Resource node. You can then replace the default images with your own images.
2D Slider Orientation is defined by numbers (0 for horizontal, 1 for vertical). Orientation can now be horizontal or vertical.
2D Image Orientation is defined by numbers (0 for horizontal, 1 for vertical). Orientation can now be horizontal or vertical.
2D Text Field
2D Color Picker
2D Camera Viewer
2D Web Viewer Script
Message
2D Gallery Menu Item Font Height Item Font Size
Orientation is defined by numbers (0 for horizontal, 1 for vertical). Orientation can now be horizontal or vertical.
2D Gallery Image Orientation is defined by numbers (0 for horizontal, 1 for vertical). Orientation can now be horizontal or vertical.
2D Gallery Product Orientation is defined by numbers (0 for horizontal, 1 for vertical). Orientation can now be horizontal or vertical.
2D Gallery Viewpoint Orientation is defined by numbers (0 for horizontal, 1 for vertical). Orientation can now be horizontal or vertical.