Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

UIUtils module

  • Last UpdatedOct 21, 2025
  • 2 minute read

The UIUtils module can be plugged into the Toolbar module, and it can also be used in isolation.

Setting Toolbar module to use UIUtils

The Toolbar module has the animatorScriptObjectName configuration field, whose default value is empty. However, when it's set to a non-empty string “uiUtils”, the toolbar will make use of the UIUtils module to animate the transitions in the UI.

When UIUtils module is added to a project, a ScriptObject named uiUtils is created. This class instance is then internally referenced by the Toolbar module itself and used to animate the UI elements.

See the Integration guide for further details.

Public interface

The public interface for the UIUtils module.

Name

Input

Description

ChangeOpacity

double opacity, double duration, string element, bool inherit, string callback

Interpolates the transparency of a UI element, from the current value to the input opacity value, within a set duration. Input arguments are:

  • opacity—such as final opacity value, in [0 1] range.

  • duration—defines how long the animation lasts (in seconds).

  • element—the name of the UI element to which the animation is applied.

  • inherit—if set to true propagates the animation effect to the children of the current element.

  • callback—if not empty, represents the name of the callback assigned to the UI element at the end of the transition.

MoveToPosition

vector2 finalPos, double duration, string element, string callback

Interpolates the position of a UI element, from the current value to the target position value, within a set duration. Input arguments are:

  • finalPos—such as target position value (in pixels).

  • duration—defines how long the animation lasts (in seconds).

  • element—the name of the UI element to which the animation is applied.

  • callback—if not empty, represents the name of the callback aassigned to the UI element at the end of the transition.

If an element has children, position changes automatically propagate to them.

Scale

vector2 finalScale, double duration, string element, string callback

Interpolates the scale of a UI element, from the current value to the inputscale value, within a set duration. Input arguments are:

  • finalScale—such as target scale value.

  • duration—defines how long the animation lasts (in seconds).

  • element—the name of the UI element to which the animation is applied.

  • callback—if not empty, represents the name of the callback aassigned to the UI element at the end of the transition.

If an element has children, scale changes automatically propagate to them.

ShiftPosition

vector2 addPos, double duration, string element, string callback

Smoothly incrementing the current position of a UI element with a specified position delta, within a set duration. Input arguments are:

  • addPos—such as delta of the translation movement (in pixels).

  • duration—defines how long the animation lasts (in seconds).

  • element—the name of the UI element to which the animation is applied.

  • callback—if not empty, represents the name of the callback assigned to the UI element at the end of the transition.

If an element has children, position changes automatically propagate to them.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in