Quantcast
Channel: Answers by "shriya"
Viewing all articles
Browse latest Browse all 98

Answer by shriya

$
0
0
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 all articles
Browse latest Browse all 98

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>