Forum rules - please read before posting.

Hotspot not highlighting

Obligatory 'I have no idea what I'm doing' disclaimer ;)

I have three hotspots over a sprite. I would like them to highlight when the user hovers the mouse over them.
I have added a highlight component to the hotspot, and linked that to the 'Object To Highlight' field.

But I can't see any change in the sprite when I hover my mouse. Any ideas?

I'm using the 2D version.

Comments

  • The Highlight component needs to be added to the graphic you want to affect - not necessarily the same GameObject that the Hotspot is on.

    Also, if you have multiple Hotspots that share the same Highlight component, then they'll conflict with one another.

    See the 3D Demo's Basement scene for examples on how this is typically set up.

    But in 2D, the wider issue is that the default sprite shader won't react to the built-in highlight effect, which works by manipulating the _Colour of the attached material's shader.

    Instead, you'll have to go with one of a couple of options:

    1. Use a "Sprites Diffuse" shader for your sprite's Material, which does react to the default Highlight effect - though it will also require Lights to be visible normally.
    2. Check Call custom events? in the Highlight component, and hook up custom script functions to perform a separate highlight effect provided by another asset or script.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.