Unity给一个Prefab添加子物体报错Setting the parent of a transform which resides in a Prefab Asset is disabled t
今天在写一个批量修改预制体的Editor脚本,在写给一个预制体添加子物体时,出现了SettingtheparentofatransformwhichresidesinaPrefabAssetisdisabledtopreventdatacorruption的报错。具体报错代码简化后如下:GameObjectparentPrefab=AssetDatabase.LoadAssetAtPath("As