Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.

Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.

在设置预制体的父对象为Canvas时报了这个错误,原因是没有把预制体进行实例化,而对其直接设置父对象。设置父对象之前要先进行实例化,然后再设置其父对象,就好了。

猜你喜欢

转载自blog.csdn.net/wk201403010114/article/details/81201552