Answers for "how to use mousedown on button in unity"

C#
1

onmouseclick unity

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;public class ExampleClass : MonoBehaviour
{
    void OnMouseDown()
    {
        // Destroy the gameObject after clicking on it
        Destroy(gameObject);
    }
}
Posted by: Guest on January-29-2020

Code answers related to "how to use mousedown on button in unity"

C# Answers by Framework

Browse Popular Code Answers by Language