Built-In
- Import the asset into your project or create an empty project.
- Go to Demo folder and run the demo scenes to quickly test the asset effects.
- Examine the code behind the script attached to the Demo game object in demo scene 1.
The Demo scenes contains 3 spheres with a Highlight Effect and Highlight Trigger scripts attached to each one. Each sphere has:
- The Highlight Effect script contains all the settings and appearance properties for the effects. If you activate the “Highlighted” checkbox, the effects will be rendered immediately.
- The Highlight Trigger component checks the position of the pointer and detected when it passes over the gameobject. When this occurs, it activates the “Highlighted” checkbox of the previous component and disables it when the pointer exits the gameobject.
Alternatively, you can create a “Highlight Manager” from the top menu GameObject -> Effects -> Highlight Plus -> Create Manager. This command will create a gameobject with the Highlight Manager script attached, responsible for detecting mouse interaction with any gameobject that matches the layer and other settings in the manager and highlight it accordingly.
URP
Demo1_HighlightExample Scene
Run the scene to to quickly test the asset effects.
This demo scene contains 3 spheres with a Highlight Effect and Highlight Trigger scripts attached to each one. Each sphere has:
- The Highlight Effect script contains all the settings and appearance properties for the effects. If you activate the “Highlighted” checkbox, the effects will be rendered immediately.
- The Highlight Trigger component checks the position of the pointer and detected when it passes over the gameobject. When this occurs, it activates the “Highlighted” checkbox of the previous component and disables it when the pointer exits the gameobject.
(Instead of adding a HighlightTrigger to each sphere, you can create a “Highlight Manager” from the top menu GameObject -> Effects -> Highlight Plus -> Create Manager. This command will create a gameobject with the Highlight Manager script attached, responsible for detecting mouse interaction with any gameobject that matches the layer and other settings in the manager and highlight it accordingly).
Inspecting the scene:
- Select any of the spheres – you will see the Highlight Effect in the inspector (it will also display any warning if there’s any missing or wrong setup related to URP).
- Examine the code behind the script attached to the “GoldSphere” gameobject.
Demo2_SelectionExample
This demo scene is an example of the selection features of Highlight Plus.
Click the sphere to permanently select or deselect them