Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

gameobject on click unity

private void OnMouseOver() {
        Debug.Log("Hovering over GameObject");
    }
Comment

unity button onclick

GetComponent<Button>().onClick.AddListener(()=>print("clicked"));
Comment

unity onclick object


using UnityEngine;
using System.Collections;

public class Click : MonoBehaviour {

    public GameObject gameObjectToClick;
    void OnClick(){
         gameObjectToClick.SpecialFunction(); //call special function you wanted to call
    }
}

Comment

PREVIOUS NEXT
Code Example
Csharp :: quotes in string f# 
Csharp :: default parameter c# 
Csharp :: remove force unity 
Csharp :: first person mouse look unity 
Csharp :: mvc refresh page from controller 
Csharp :: multidimensional arrays c# 
Csharp :: emgucv open image c# 
Csharp :: All Possible SubString of string 
Csharp :: wpf stackpanel 
Csharp :: linq from multiple tables 
Csharp :: meaning immutable and mutable 
Csharp :: run file windows forms 
Csharp :: sorting list by date time dec in c# 
Csharp :: linked list reverse 
Csharp :: c# split string by index 
Csharp :: prevent system shutdown c# 
Csharp :: check file lock c# 
Csharp :: c# get list object type of generic list 
Csharp :: c# delete files 
Csharp :: unity 2d enemy patrol script 
Csharp :: c# iterate sorteddictionary 
Csharp :: unity soft body 
Csharp :: finding keys in the registry 
Csharp :: c# create log file 
Csharp :: c# write line 
Csharp :: properties in c# 
Csharp :: double parse csharp removes decimal 
Csharp :: c# usermanager update user 
Csharp :: c# listview filter contains 
Csharp :: how to find length of list c# 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =