Example 3 - Graphics

The Graphics example demonstrates the use of two Action Pack 2 Actions; Highlight Object On, and Highlight Object Off.

These two Actions use cusotm Shaders amd Materials that have been included in the Action Pack 2 Resources folder so they will automaitcally be included in your build.

The example has 3 triggers:

  1. On Mouse Enter/Exit

  2. On Key Down "H"

  3. On Key Down "J"

For the mouse enter/exit to work, you must add a collider to your object, in this case we have added a Capsule collider around a Cylinder.

The Actions call the Highlight Object On and Off respectively, where color and width can be set from a value or a variable.

The OnKeyDown triggers work similar but without the need for a collider. You can highlight as many Objects as needed with various colors and width.

Note: these shaders do not work with HDRP.

Last updated