Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

IsPointerOverGameObject - Ignoring Some Objects

$
0
0
In my voxel game, much like other voxel games, you use the mouse to add or delete blocks in the world.

When the pause menu or other UI elements are on screen, I don't want the click (used for returning back to the game) to go through and also add or delete a block in the world.

So, I use IsPointerOverGameObject() to determine if the cursor is over an event object. If it is, I don't cast the ray into the world.

The problem is, I overlay a cursor icon over the hidden/locked cursor while in...

IsPointerOverGameObject - Ignoring Some Objects

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>