How would I check for the target, so like, if a player clicked a cube it would do Debug.Log(“Clicked”);?
This is how.
For the 1000th time, look stuff up before making a thread.
You can either have a script with OnMouseDown on the GameObjects you want to be able to click, or you can use Raycasts and Camera.ScreenPointToRay to determine the object the mouse is on.
Fellshadow, for the 1000th time, I DID! In fact the thing that you searched showed what I clicked. (was highlighted in purple).
I found OnMouseDown, but wasn’t sure if that detected for the gameobject the script is inside, but because DanielQuick says so, I guess it does.
Well those links show you exactly what you have to do, and is exactly how I figured out how to do it when I first started Unity.
You have to actually look at what they say…
Had you actually tried it before posting you would have found out for yourself. Seriously - stop being a dick when people request that you do some legwork yourself.
Just looking back at this, and a few other posts, and I see Kelso ain’t very friendly. Sry for bump, this can be locked