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.解析
設置位于預置體內(nèi)中資產(chǎn)去轉(zhuǎn)換父元素是禁用的,以防止數(shù)據(jù)損壞
因為只是加載了該預制體,但是呢,沒有進行實例化
3.解決方案
方案 :把加載出來的預制體進行實例化,不懂的話,可以看我如下的代碼,提供參考
實例化函數(shù):GameObject.Instantiate()//參數(shù):預制體