当前位置:网站首页>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");
}
}
边栏推荐
- 82. (cesium article) cesium points move on 3D models
- Natapp intranet penetration tool Internet access personal projects
- A lock faster than read-write lock. Don't get to know it quickly
- Arduino development (II)_ RGB light control method based on Arduino uno development board
- Global styles and icons
- What are the application scenarios of real name authentication in the cultural tourism industry?
- knife4j通过js动态刷新全局参数
- Diffuse reflection of QT OpenGL light
- Feixin died in 2022: a good hand of China Mobile was broken, and 500million users became "zombies"
- Qt opengl 让物体在关照下动起来,形成动画
猜你喜欢

Feixin died in 2022: a good hand of China Mobile was broken, and 500million users became "zombies"

Leetcode daily practice 206. Reverse the linked list

Ue5 uses DLSS (super sampling) to improve the FPS of the scene away from the optimization scheme of Caton

User login switching case

Typoa spelling check: missing dictionary file for Chinese

LeetCode每日一练 —— 206. 反转链表

Hexagon_ V65_ Programmers_ Reference_ Manual(5)

Natapp intranet penetration tool Internet access personal projects

NPDP | what kind of product manager can be called excellent?

API Gateway介绍
随机推荐
Source Insight 4.0使用介绍
How to solve the problem that tp6 controller does not exist: app\controller\index
认识传输介质通信方式
IPv4/IPv6、DHCP、网关、路由
Rk3399 platform development series explanation (process part) 15.36, understanding process and collaboration process
Leetcode daily practice - the penultimate node in the linked list
Diffuse reflection of QT OpenGL light
Vant component library
智能网联跑出中国「加速度」,26.15%搭载率背后的市场洗牌
Typoa spelling check: missing dictionary file for Chinese
数字引领 规划先行 聚焦智慧规划信息平台建设及应用项目探索实践
Opencv implements image clipping and scaling
重复的DNA序列[hash判定重复+滑动窗口+二进制编码之位运算]
“收割”NFT:200元淘宝买图,上链卖30万元
Programmer growth Chapter 18: project launch
Overview of understanding the physical layer of transmission media
API Gateway介绍
R语言使用epiDisplay包的power.for.2p函数进行效用分析 ( 效能分析、Power analysis)、给定两个样本的比例值(proportions)、样本量计算效用值
获取委托中注册的方法
How to calculate the execution time in the function resource usage when using the timer trigger type to process database data?