What do you want to save?
Add Code snippet
New code examples
-
C# 2022-03-06 13:05:05
unity assign button onclick
public Button yourButton; void Start () { Button btn = yourButton.GetComponent<Button>(); //Grabs the button component btn.onClick.AddListener(TaskOnClick); //Adds a listner on the button } void TaskOnClick() { Debug.Log ("You have click... Add solution -
Other 2022-02-21 13:40:11
javascript-change color onclick()
const btn = document.querySelector('button'); function random(number) { return Math.floor(Math.random() * (number+1)); } btn.onclick = function() { const rndCol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.st... Add solution -
Html 2021-10-28 09:04:05
popup box in html
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: Arial, Helvetica, sans-serif;} /* The Modal (background) */ .modal { display... Add solution -
C# 2021-09-19 22:01:02
how to code button click unity
using UnityEngine; using UnityEngine.UI; using System.Collections; public class ClickExample : MonoBehaviour { public Button yourButton; void Start () { Button btn = yourButton.GetComponent<Button>(); btn.onClick.AddListener(TaskOnCli... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5