Highlight Plus offers a Selection feature integrated in the Highlight Manager, which can draw objects differently depending if they’re selected or not. You can select any number of objects by clicking on them.
Refers to the temporary effect that causes an object to show an outline, glow or other kind of effect. For example, when using the Highlight Trigger or Highlight Manager components, and the “Highlight On Hover” checkbox is activated, the asset will “highlight” any target automatically when the pointer is positioned over that target. When you move the pointer out of the object, the highlight disappears.
You can also use scripting to toggle the highlight on / off by calling SetHighlighted() or setting the highlighted property of the HighlightEffect component.
The demo scene 1 provides an example of highlighting spheres.
Refers to the ability to keep the highlight visible when you click on objects. To enable the new selection feature, tick the option “Select On Click” and assign a “selected” profile and a “selected and highlighted” profile:
- Selected Profile: the profile you want to use to visualize an object that’s selected only (not highlighted).
- Selected and Highlighted Profile: the profile to use when the object is both selected and highlighted.
Other useful options are:
- Toggle option will switch the selection state of the object on each click.
- Single Selection option will disable any other selected objects in the scene when selecting a new object.
- Keep Selection will keep current selected objects when clicking outside of any selectable object.
Note that the Highlight Effect attached to the Highlight Manager contains the default highlight settings which are used to highlight objects that are not selected.
Scripting support notes
The Highlight Effect script exposes the “lastHighlighted” and “lastSelected” properties which point to the last highlighted or selected object.
The Highlight Manager script exposes a “selectedObjects” public property which can be used with scripting to get a list of the currently selected objects
Use the SelectObject, ToggleObject and UnselectObject methods of the Highlight Manager to manually control the selection state of any object in the scene using scripting.
The demo scene 2 provides an example of selection by clicking on spheres.