Search Issue Tracker

Won't Fix

Votes

0

Found in

2022.3.12f1

2023.1.18f1

2023.2.0b14

2023.3.0a11

6000.0.0b11

Issue ID

UUM-65998

Regression

No

Build fails with "ArgumentException: Could not load Prefab contents..." errors

-

Reproduction steps:
1. Open the attached “prefab error.zip“ project
2. Build And Run
3. Observe the Console

Expected result: Build completes successfully without any errors
Actual result: Build completes with a result of 'Failed' and two “ArgumentException“ errors are thrown

Reproducible with: 9.0.4 (2022.3.12f1),10.0.3 (2023.1.18f1, 2023.2.0b14, 2023.3.0a11)
Couldn't test with: 7.12 (2021.3.31f1) (Errors in the Console)

Reproduced on: Windows 11 Pro
Not reproduced on: No other environment tested

Notes:
- First error:
”ArgumentException: Could not load Prefab contents at path Assets/Prefabs/zones/Enchanted Forest/Creatures/bell guardian.prefab. Prefabs should have exactly 1 root GameObject, 2 was found.
UnityEditor.PrefabUtility.LoadPrefabContents (System.String assetPath) (at <35e0ddf7eaeb4cf9a237301794fcc50d>:0)
HutongGames.PlayMakerEditor.ProjectTools.GetPrefabGameObject (System.String prefabPath) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:165)
UnityEngine.Debug:LogException(Exception)
HutongGames.PlayMakerEditor.ProjectTools:GetPrefabGameObject(String) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:172)
HutongGames.PlayMakerEditor.ProjectTools:DoPreprocessPrefabFSMs(List`1) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:291)
HutongGames.PlayMakerEditor.ProjectTools:DoPreprocessPrefabFSMsInBuild() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:127)
HutongGames.PlayMakerEditor.ProjectTools:PreprocessPrefabFSMs() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:57)
HutongGames.PlayMakerEditor.PlayMakerPreProcessBuild:OnPreprocessBuild(BuildReport) (at Assets/PlayMaker/Editor/PlayMakerBuildCallbacks.cs:49)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)”
- Second error:
”ArgumentException: Could not load Prefab contents at path Assets/Prefabs/zones/Enchanted Forest/swinging fungi set.prefab. Prefabs should have exactly 1 root GameObject, 2 was found.
UnityEditor.PrefabUtility.LoadPrefabContents (System.String assetPath) (at <35e0ddf7eaeb4cf9a237301794fcc50d>:0)
HutongGames.PlayMakerEditor.ProjectTools.GetPrefabGameObject (System.String prefabPath) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:165)
UnityEngine.Debug:LogException(Exception)
HutongGames.PlayMakerEditor.ProjectTools:GetPrefabGameObject(String) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:172)
HutongGames.PlayMakerEditor.ProjectTools:DoPreprocessPrefabFSMs(List`1) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:291)
HutongGames.PlayMakerEditor.ProjectTools:DoPreprocessPrefabFSMsInBuild() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:127)
HutongGames.PlayMakerEditor.ProjectTools:PreprocessPrefabFSMs() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:57)
HutongGames.PlayMakerEditor.PlayMakerPreProcessBuild:OnPreprocessBuild(BuildReport) (at Assets/PlayMaker/Editor/PlayMakerBuildCallbacks.cs:49)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)”
- Additional “Assertion failed on expression” Build errors occur

  1. Resolution Note:

    Thank you for reporting a bug to Unity.

    We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.

    Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.