Unity问题记录(二)自定义EditorWindow,当资源发生变化时,报Operation is not valid due to the current state of the object

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/qq_28474981/article/details/98873397

Unity问题记录(二)自定义EditorWindow,当资源发生变化时,报Operation is not valid due to the current state of the object

1.问题

自定义EditorWindow,当资源发生变化时,报InvalidOperationException: Operation is not valid due to the current state of the object

2.原因

好像是你那段代码其实不需要,读取到的时候发现里面没有逻辑需要走

3.解决方案

将报错的哪行和与之对应的Begain删掉即可
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_28474981/article/details/98873397
今日推荐