Unity Destroying assets is not permitted to avoid data loss.

概要

当destory()unity预知克隆体时出现以上错误

因为这里的Obj并不是克隆体,而是预制体。

解决办法:

obj赋值为克隆体并返回就能成功删除了