网上直接搜的代码.需要的使用也简单,所以就不过多说明. 但是网上都说,他们之间的差距,delegate比较快,效果高.怎么个高法呢?还是自己来测试下时间. 故此, 个人之用来比较下时间差别. 一.直接代码 using UnityEngine; using System.Collections; /// <summary> /// Delegate basic. /// just test Delegate && SendMessage .. /// /// By Chiuan…
Attribute是c#的语言特性 msdn说明如下: The Attribute class associates predefined system information or user-defined custom information with a target element. A target element can be an assembly, class, constructor, delegate, enum, event field,interface, method,…