Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity event

using UnityEngine;
using UnityEngine.Events;


public class event_test : MonoBehaviour
{
    UnityEvent my_event=new UnityEvent();

    void Start()
    {
        my_event.AddListener(On_change);
    }
    void Update()
    {
        if(Input.GetKeyDown(KeyCode.Escape))
        {
            my_event.Invoke();
        }
    }
    void On_change()
    {
        Debug.Log("value changed to ");
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity rotate direction by angle 
Csharp :: .net mvc decimal displayformat currency 
Csharp :: byte to binary c# 
Csharp :: last two characters of string c# 
Csharp :: letter at index of string c# 
Csharp :: arrays in c# 
Csharp :: list clone - C# 
Csharp :: get last character of string c# 
Csharp :: how to make dictionary c# 
Csharp :: c# optional parameters 
Csharp :: c# create dynamic json 
Csharp :: doing void when gameobject setactive unity 
Csharp :: unity call function on animation end 
Csharp :: wpf mouse over style trigger 
Csharp :: c# contains() 
Csharp :: c# console clear 
Csharp :: Operator Overloading | C# 
Csharp :: raylib c# 
Csharp :: how to rotate object in unity only on one axis 
Csharp :: unity editor script 
Csharp :: How can I return image from controller asp.net 
Csharp :: instantiate a player in photon 
Csharp :: calculate how much memory an object take c# 
Csharp :: asp.net model 
Csharp :: find how many digits a number has 
Csharp :: multi line comment c# 
Csharp :: how to show an arrya in c# 
Csharp :: c# get property type of list 
Csharp :: c# convert list to array function 
Csharp :: how to create public variable in c# 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =