unity onclick object

77

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
    }
}

Comments

Submit
0 Comments