Skip to content

you can detect clicks and double clicks in unity with conditional statements.

Notifications You must be signed in to change notification settings

Mohammad9760/custom-unity-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

custom-unity-button

here's the video demonstration: http://youtu.be/3Zcdc33xbFQ

using this script on your UI gameobjects you can detect clicks and double clicks using conditionals. create a variable of type Btn and use it in an if statement. eg:

Btn fireBtn;

void Start(){ fireBtn = GameObject.Find("Fire Button").GetComponent(); }

void Update(){

if(fireBtn.Clicked)
  Debug.Log("bang")
  
if(fireBtn.DoubleClicked)
  Debug.Log("bang bang")

}

About

you can detect clicks and double clicks in unity with conditional statements.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages