2D Web Viewer Properties

2D web viewer properties are managed through the Properties panel. You can view and modify them.

This page discusses:

See Also
About Sending and Receiving Signals with Objects

General

Name
Defines the name of the web viewer actor.
Enable
Activates or deactivates interactions with the web viewer actor.
Web Resource
Displays a web resource in the web view actor.
Active
Defines whether or not the actor is active during a playing session.
Notes:
  • The actor's activity depends on the context. If one or more parent actors are inactive in the hierarchy, the actor is also inactive.
  • When the actor is inactive during a playing session, its associated behaviors or scripts are inactive.
Execution Mode

Lets you select between two different modes that modify how the experience scripter communicates between the experience and the web page displayed in a web viewer:

  • Content Security Policy (CSP) emulation:

    The Content Security Policy (CSP) emulation execution mode guarantees that the web viewer works similarly in the Creative Experience desktop app and in the web player. This execution mode ensures better security and control over the web content displayed in your web viewer.

    Important: Web pages that do not allow their content to be in iframes (or that cannot be in iframes) do not appear correctly in the desktop app with this execution mode.

    In this execution mode, if an error occurs while loading a web page, the error appears directly in the web viewer (in the 3D area) and in the play console during Play mode.

  • Legacy:

    The Legacy execution mode lets you display web pages in web viewers without any specific restriction. However, this mode does not guarantee proper functioning of web pages with the web player.

For more information, see Web Viewer Content Security Policy (CSP) Emulation.

Configuration

URL
Defines the URL of the web page.

Rendering

Visible
Shows or hides the web viewer actor.
Opacity
Defines the opacity of the web viewer actor.
Notes: The value must be positive and be included between 0 and 1.
  • 0: transparent
  • 1: opaque

Layout

Attachment
Defines the alignment of the web viewer actor (for example center, upper-right or attached to the 3D actor's position).
Offset
Defines the position of the web viewer actor.

Select one of the two available modes to specify whether you want the x and y values of your actor offset to be:

  • Static (pixel px).
  • Relative to the current size of the experience viewport (percentage %) even when you resize the viewport. This enables your actor to adapt to the size of the main viewport automatically.

    This behavior applies when your experience is in Authoring or Play mode, in 3DPlay, or in the web player after a web publication.

    Note: The percentage % mode is useful to create experiences that become automatically responsive based on the different resolutions or aspect ratios of the screens where these experiences play. This prevents you from having to create multiple experiences or scenes to support each hypothetical output.

Switching from one mode to the other does not affect the current offset and position of the selected 2D UI actor in the main viewport. There is an automatic conversion of the unit values of the current mode to the unit values of the other mode.

Minimum Dimension
Defines the size of the web viewer actor.
Note: Values are in pixels or percent.

Advanced

Message
Defines the message displayed by the web page.
Script
Defines the script sent to the web page.

Associated Capacities

Sensors
  • Is Entered: This capacity triggers when the mouse enters the UI actor.
  • Is Exited: This capacity triggers when the mouse exits the UI actor.
  • Is Enabled: This capacity triggers when the UI actor's state looks active.
  • Is Visible: This capacity triggers when the UI actor is visible in the experience.
  • Has received a web message: this capacity triggers when the web page displayed in the web viewer has sent a message.
  • Has received signal: This capacity triggers when the actor receives a signal (as a string parameter).
Drivers
  • Send a web message: the capacity sends a string message to the web page displayed in the web viewer.
  • Sends signal: The actor sends a signal (as a string parameter).