Quantcast
Viewing latest article 15
Browse Latest Browse All 98

Answer by shriya

Hi, I have attached the script.Initially your button should be inactive in hierarchy. Now on clicking mouse it will get active on screen. `using using UnityEngine; using UnityEngine.UI; using System.Collections; public class asdf : MonoBehaviour { public GameObject abc;//Its your button // Use this for initialization void Start () { } // Update is called once per frame void Update () { if(Input.GetMouseButtonDown(0)) { Debug.Log("Pressed left click."); abc.SetActive(true); } } } Hope this will help you. You can place the code in start as per your need.

Viewing latest article 15
Browse Latest Browse All 98

Trending Articles