[Unity&C#&委托事件&未实例化]使用委托事件的时候事件对象未实例化

xiaoxiao2021-02-28  84

在对 委托 事件  进行 操作 的时候, 事件 的 对象为空

NullReferenceException: Object reference not set to an instance of an object

unity delegate eventNullReferenceException: Object reference not set to an instance of an object

另外一个组件的调用 监听事件 的 Start 函数 ,改为 Awake 函数,就行了

转载请注明原文地址: https://www.6miu.com/read-85713.html

最新回复(0)