解决报错-Setting the parent of a transform which resides in a Prefab**

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()//参数:预制体

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容