Advertisement

[Unity][C#][ILRuntime]热更新倒计时

阅读量:
复制代码
 KeyNotFoundException: Cannot find Delegate Adapter for:TimeManager.OnTimedEvent(Object source, ElapsedEventArgs e), Please add following code:

    
 appdomain.DelegateManager.RegisterMethodDelegate<System.Object, System.Timers.ElapsedEventArgs>();
    
    
    
    

在Unity项目开发过程中,需在ILRuntimeWrapper.cs文件中的void RegistDelegate()函数内插入以下代码段。

复制代码
 ...

    
 public class ILRuntimeWrapper : UnitySingleton<ILRuntimeWrapper>
    
 ...
    
 void RegistDelegate()
    
 {
    
 ...
    
 appdomain.DelegateManager.RegisterMethodDelegate<System.Object, System.Timers.ElapsedEventArgs>();
    

全部评论 (0)

还没有任何评论哟~