Answers for "how to click a gameobject in unity"

C#
2

gameobject on click unity

private void OnMouseOver() {
        Debug.Log("Hovering over GameObject");
    }
Posted by: Guest on December-31-2020
0

unity click object

void OnMouseDown()
{         
	// this object was clicked - do something     
    Destroy (this.gameObject);  
}
Posted by: Guest on January-15-2020
-2

how to click a gameobject in unity

using UnityEngine.UI;

public Text text;
text.text = "new text";
Posted by: Guest on December-14-2020

Code answers related to "how to click a gameobject in unity"

C# Answers by Framework

Browse Popular Code Answers by Language