Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity ui button

using UnityEngine.UI;

public class ButtonScript : MonoBehaviour
{
	public Button btn;

	void Awake()
    {
		btn.onClick.AddListener(btnClicked);
	}

	void btnClicked()
    {
		Debug.Log("Button clicked");
	}
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: fluent api 
Csharp :: change size of button c# 
Csharp :: working with registry in c# 
Csharp :: c# optional arguments 
Csharp :: viewBag as a list 
Csharp :: timer unity 
Csharp :: player input manager join manually 
Csharp :: convert path to uri c# 
Csharp :: convert string to decimal c# 
Csharp :: combobox in datagrid wpf 
Csharp :: select range in list c# 
Csharp :: c# xmldocument from file 
Csharp :: how to change color of part from the text in textblock wpf 
Csharp :: wpf relativesource 
Csharp :: c# find comma in text and remove 
Csharp :: c# centos Regex Username 
Csharp :: monogame print 
Csharp :: Convert DataTable to excel file c# using epplus 
Csharp :: C# foreach loop async but wait at end 
Csharp :: how to get relative path in c# 
Csharp :: how to check if a file is running in c# 
Csharp :: how to add gravity without rb in unity 
Csharp :: convert list to datatable c# 
Csharp :: Unity upload image to project 
Csharp :: mvc model validation for decimal type 
Csharp :: cread 2-dimensional array in c# 
Csharp :: if statement in razor using "?" and ":" 
Csharp :: how to compare time strings in c# 
Csharp :: C# Async Function with await 
Csharp :: c# datediff 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =