Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Button Objects"

Discussion in 'Scripting' started by C30N9, Aug 30, 2014.

  1. C30N9

    C30N9

    Joined:
    Dec 11, 2013
    Posts:
    34
    I have several sprites in 3D space, and I want to make them act like buttons (clickable/touchable). Any ideas?
     
  2. smitchell

    smitchell

    Joined:
    Mar 12, 2012
    Posts:
    702
    I'm assuming you're a complete beginner? so either look into ray casting (which you might find difficult if you're new to programming) or look into the OnMouseUp () functions built into mono behaviours
     
  3. C30N9

    C30N9

    Joined:
    Dec 11, 2013
    Posts:
    34
    No, not at all. I'm just asking for a trick for creating "buttons" that are not part of GUI.

    I think raycasting solves this.