当前位置:网站首页>Get the method registered in the delegate
Get the method registered in the delegate
2022-07-27 21:10:00 【Sunshine in front of my heart】
Knowledge point
Delegate Of GetInvocationList Method returns an array , This array stores the added method
example
using UnityEngine;
using UnityEngine.Events;
public class TestEvent : MonoBehaviour
{
UnityAction action;// No parameter no return value entrust
event UnityAction eventAction;// event
void Start()
{
action += Print;
action += Print;
// Print call list
foreach (var item in action.GetInvocationList())
{
Debug.Log(item.Method);// Print method name
}
eventAction += Print;
eventAction += Print;
// Print call list
foreach (var item in eventAction.GetInvocationList())
{
item.Method.Invoke(this, null);// Execution method
}
}
void Print()
{
Debug.Log("123");
}
}
边栏推荐
- Knowledge management system promotes the development of enterprise informatization
- Arduino development (II)_ RGB light control method based on Arduino uno development board
- Introduction to source insight 4.0
- Digital leading planning first, focusing on the construction of intelligent planning information platform and the exploration and practice of application projects
- 14 day Hongmeng device development practice - Chapter 7 device networking cloud learning notes
- Obtain website shell permission based on file upload vulnerability
- 最新版web漏洞扫描工具AppScan\AWVS\Xray安装及使用教程
- Hexagon_V65_Programmers_Reference_Manual(5)
- 文件上传绕过WAF的技巧大全
- DJI push code (one code for one use, updated on July 26, 2022)
猜你喜欢

82. (cesium article) cesium points move on 3D models

Automatic test solution based on ATX

中地数码:融合创新国产GIS 乘风而上助推实景三维中国建设

Installation and use tutorial of the latest version of Web vulnerability scanning tool appscan\awvs\xray

Do you know about data synchronization?

A lock faster than read-write lock. Don't get to know it quickly

Hexagon_ V65_ Programmers_ Reference_ Manual(6)

Automated testing ----- selenium (II)

成分句法分析综述(第二版)

LeetCode每日一练 —— 203. 移除链表元素
随机推荐
基于文件上传漏洞获得网站 shell 权限
How to calculate the execution time in the function resource usage when using the timer trigger type to process database data?
LeetCode每日一练 —— CM11 链表分割
好开不贵,舒适安全!深度体验比亚迪宋Pro DM-i
QT OpenGL makes objects move under care to form animation
JS closure knowledge
Codeforces 1706E 并查集 + 启发式合并 + ST 表
AIRIOT答疑第6期|如何使用二次开发引擎?
Hexagon_ V65_ Programmers_ Reference_ Manual(6)
【R语言】【1】初学R语言语法使用Rstudio编辑
Digital leading planning first, focusing on the construction of intelligent planning information platform and the exploration and practice of application projects
14天鸿蒙设备开发实战-第七章 设备联网上云 学习笔记
Typroa 拼写检查: 缺少对于 中文 的字典文件
R语言使用epiDisplay包的power.for.2p函数进行效用分析 ( 效能分析、Power analysis)、给定两个样本的比例值(proportions)、样本量计算效用值
MapGIS三维场景渲染技术与应用
Rk3399 platform development series explanation (process part) 15.36, understanding process and collaboration process
飞信卒于2022:中国移动一手好牌被打烂,5亿用户成“僵尸”
How to talk to CIO / CTO
How to translate the address in the program?
Feixin died in 2022: a good hand of China Mobile was broken, and 500million users became "zombies"