Supported Interactions

Tooltip Collection > Tooltip Launch. Defines what activates and deactivates a visual tooltip.

Tooltip System supports basic interactions controlled from the central collection, and externally by separate trigger objects or manually from any script.

For Tooltip Triggers

Any object with Tooltip Trigger component can detect the following:

  • Trigger = On Hover (Desktop Only). Hovering the cursor over this object triggers a tooltip from the collection, and it deactivates when the hover ends.

  • Trigger = On Click. Clicking or touching this object triggers a tooltip from the collection, and it deactivates on any subsequent click.

  • Trigger = On Screen Center. Focusing the center of the screen on this object triggers a tooltip from the collection, and it deactivates when the focus moves away.

  • Trigger = On Trigger Collision. Requires specifying a component or tag of another object to collide, for example, Player`s View Zone with Collider. When a collision is detected, it triggers a tooltip from the collection, and deactivates when the collision ends. Example context: when the player approaches an interactive hatch, or moves away from it.

  • Trigger = On Distance. Requires specifying another object or its tag, along with the minimum distance needed to activate the tooltip, for example, target is tagged Player. When the distance from this object to the target is less than the required value, it triggers a tooltip from the collection, and deactivates when the distance increases beyond it. Example context: a popup arrow tooltip when the character passes by an interactive passage. Tag-based mode caches all existing objects with the specified tag at Start. For runtime spawned objects update cache with AddDistanceTarget(spawnedObject); call.

For Tooltip Collection

The central Tooltip Collection list can detect basic input on objects identified by a certain criteria:

Trigger
Description
Example of usage

On Hover (Desktop Only)

Triggered when a hover over an object that passes the Check Object validation is detected. Deactivated when the hover ends.

Hovering over a character with the "Character" tag in combat highlights it as a target.

On Click

Triggered when the target object is clicked or touched. Deactivated on any subsequent click.

Clicking a card on the opponent’s field in the card game triggers a popup showing its description.

On Screen Center

Triggered when the target object is in the center of the player’s view (raycast from the Camera). Deactivated when the focus moves away.

Hovering over an interactive letter in the detective game highlights it as collectible.

External Trigger Only

The logic is controlled externally by scene object with the Tooltip Trigger component. It can also be triggered manually via methods in the Scene References (e.g. ShowTooltip()).

Lever in the scene activates a tooltip when the player approaches it and deactivates when moves away.

The Check Object validation can be performed as follows:

  • Check Object = By Tag. Specify the Compare Tag as a string. Then the trigger selected above will only activate on objects with that tag.

  • Check Object = By Layer. Specify the Compare Layer as int index. Then the trigger selected above will only activate on objects with that layer.

  • Check Object = By Type. Specify the Compare Type: 3D/2D/UI. Then the trigger selected above will only activate on objects with that type.

  • Check Object = By Name. Specify the Compare Name. Then the trigger selected above will only activate on objects with name containing that part.

  • Check Object = By Component. Specify the Compare Component: from the list of custom components created in the project (not built-in, user-defined). Then the trigger selected above will only activate on objects with that component.

  • Check Object = By ComponentValue. Specify the Compare Component & it`s Value to compare with target value. So the trigger will only activate on objects with that component and required value. The selection can be made from scripts manually created in the project. Supported variable types: Bool, Int, Float, String, Enum. Available comparison operators: Equals (==), NotEquals (!=), GreaterThan (>), LessThan (<), GreaterOrEqual (>=), LessOrEqual (<=), Contains (string.Contains), StartsWith (string.StartsWith), EndsWith (string.EndsWith).

Configuration that triggers the visual only when hovering over objects with IsHexAvailable = true in the ValueHandler component on the object.

Universal Launch Management

Regardless of the trigger source, visuals to be displayed are stored and managed in the central Tooltip Collection. Tooltip Replay controls how many times a tooltip can be launched. Progress between sessions is saved in JSON, is handled and can be reset via TooltipPlayer.

  • Tooltip Replay = Reusable. Triggered on interaction an unlimited number of times. For example, highlight the target in combat every time using an aim-style pointer.

  • Tooltip Replay = Play Once. Triggered on interaction only once, on the first activation ever. For example, show the text tooltip “Press E” once for object interaction and never show it again.

  • Tooltip Replay = Play Once Per Session. Triggered on interaction once per game session. Show the text tooltip “Press E” once for object interaction and remind only once per session.

* The interactions shown here are only a small part of what’s needed to create tooltips. Check out the Automatic Tutorial Maker asset arrow-up-rightto access recognition of all possible inputs for in-game hints: keyboard input, mobile gestures, double clicks, drag and drop, and more →

Last updated