美文网首页
解决报错-Setting the parent of a tra

解决报错-Setting the parent of a tra

作者: 一枚64byte的仙女 | 来源:发表于2023-03-19 15:20 被阅读0次

1.Setting the parent of a transform which resides in a Prefab**

Setting the parent of a transform which resides in a Prefab Asset is disabled to prevent data corruption 

2.解析

设置位于预置体内中资产去转换父元素是禁用的,以防止数据损坏

因为只是加载了该预制体,但是呢,没有进行实例化

3.解决方案

方案 :把加载出来的预制体进行实例化,不懂的话,可以看我如下的代码,提供参考

实例化函数:GameObject.Instantiate()//参数:预制体

相关文章

网友评论

      本文标题:解决报错-Setting the parent of a tra

      本文链接:https://www.haomeiwen.com/subject/xaryrdtx.html