How to set active object while another object attaching?

For example.

  • You need an icon to pop up after a character walk in the circle and disappear when a character steps out.

I got a method that uses a lot of code and objects to accomplish it, but I feel like this is not the right way to do.

please some body help.

You should be able to set up a collider as a trigger, create the icon object inside OnTriggerEnter, and destroy it inside OnTriggerExit.

Rather than creating/destroying the icon you could just enable/disable it as well.

1 Like