I tried it and it was much easier than Oskay's Adventure but I really liked how the objects and grass looks.
Button
17
Posts
1
Topics
2
Followers
1
Following
A member registered Jul 30, 2021 · View creator page →
Creator of
Recent community posts
Shoot Em Space Rocks! by Button (itch.io) well it was fun and I experimented a lot and learnt a few neat tricks
Take a look at the code from the manual.
using UnityEngine; using UnityEngine.UI; using System.Collections; public class ClickExample : MonoBehaviour { public Button yourButton; // Put your button in here void Start () { Button btn = yourButton.GetComponent<Button>(); btn.onClick.AddListener(TaskOnClick); //When the button gets clicked/pressed it will call TaskOnClick() function below } void TaskOnClick() { Debug.Log ("You have clicked the button!"); } } I hope this helps. I've struggled with this same topic a while ago and this helps