【エラー】Setting the parent of a transform which resides in a Prefab Asset is disabled to prevent data corruption | Unity Forum | Tech Stadium Forum

【エラー】Setting the pa...
 
通知
すべてクリア

【エラー】Setting the parent of a transform which resides in a Prefab Asset is disabled to prevent data corruption  

  RSS

Student
(@student)
メンバー Moderator
結合: 4年前
投稿: 1345
01/09/2022 12:12 am  

Setting the parent of a transform which resides in a Prefab Asset is disabled to prevent data corruption
(プレハブアセットに存在するトランスフォームの親の設定は、データの破損を防ぐために無効になっています)

となってしまうことで頭を悩ませています。


引用
Teacher
(@admin)
メンバー Admin
結合: 4年前
投稿: 1313
01/09/2022 12:12 am  

記載のエラーは SetParent の対象の _content が正しく Instantiate されていないオブジェクトの場合に発生することがあります。

Inspecotr で _content を設定しているならば、それがシーン上のオブジェクトなのか、プレハブなのか、確認してみましょう。


返信引用
Student
(@student)
メンバー Moderator
結合: 4年前
投稿: 1345
01/09/2022 12:13 am  

プレハブを指定していた、ようなので、シーン上のオブジェクトを指定できるようFindを使ってみたところ動きました!
ありがとうございました。


返信引用
共有:
タイトルとURLをコピーしました