playMaker

Author Topic: uGUI: How can I detect if a world canvas element is out of the camera viewport?  (Read 1441 times)

DocEntropy

  • Playmaker Newbie
  • *
  • Posts: 2
Hey guys,

I wonder if there is any custom action, or action that I'm missing that can help me detect if a uGUI canvas (displayed in world space) is outside the camera viewport.

Is there a way to achieve this in playmaker?

I needed to find out if my world space canvas is out of the screen so that i can move it back in the frustum (and keep it on the screen for a period of time).

DocEntropy

  • Playmaker Newbie
  • *
  • Posts: 2
Actually, I think I figured it out:

I used the Is Visible in Camera Frustrum action found on Ecosystem - it required a rendered component so I added a sprite renderer component to the world space canvas - setting its color alpha to 0 so that it doesn't interfere with the rest of the setup.

Posting it here in case others need this bit of info.