unity3d中运行项目出现的问题

当我对一个unitypackage文件进行build & run时出现以下错误

Destroy may not be called from edit mode! Use DestroyImmediate instead.
Also think twice if you really want to destroy something in edit mode. Since this will destroy objects permanently.

“在编辑模式下不能调用Destroy方法,请使用DestroyImmediate方法代替。“

于是我在U3D中双击错误,代码在VS里打开,找到所有调用Destory的地方,替换成DestroyImmediate。好了!

你可能感兴趣的:(Unity)