Forum rules - please read before posting.

Changing Order In Layer via Hotspot Interaction

Hello everyone,

I am using Unity 2018.3 and AC 1.66.

Currently developing a simple hidden object game.
I am pretty new at this so pls forgive my very rudimentary how-to question...

My hidden object's 'order in layer' = -10 (partially hidden under a sprite).
Once clicked on (hotspot interaction) I would like the object to come to the fore eg. order in layer = 0.

How is this done? If you could point me in the right direction would very much appreciate it.

H

Comments

  • Welcome to the community, @Harriet.

    You can do this through animation - attach an Animator to the sprite, and create two animations. One sets the Order In Layer to -10, another sets it to 0. Then create an Animator parameter in your Controller, and use it to set up transitions between the two animations.

    (The above is all using Unity's own workflow - separate from AC - so it's a little abridged. See Unity's own docs for more on Animator Controllers and Animator Parameters.)

    You can then control the sprite's order in layer by changing this parameter value. This can be done by using AC's Object: Animate Action, and setting the Method to Change Parameter Value.

  • Hi Chris,

    Thank you very much for this info. It is beyond my skillset at the moment but will investigate. Cheers!

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.