Getting the error Could not load Prefabs content at path....Prefabs should have exactly 1 root GameObject. We haven't been doing anything to the prefab. The game runs in the editor but only appeared when trying to build to Android. How do we go ahead and fix this?
This was happening to one prefab that we couldn't figure out, had to delete the whole prefab and recreate it from scratch to fix it. Now this is happening to multiple prefabs in the game. Our hunch is also it may be because of weird merging things using PlasticSCM.
Example of one of the errors:
ArgumentException: Could not load Prefab contents at path Assets/Prefabs/FitBook/Box Holder.prefab. Prefabs should have exactly 1 root GameObject, 2 was found.
UnityEditor.PrefabUtility.LoadPrefabContents (System.String assetPath) (at <091d339d138346aa90aa98b5607c9126>:0)
HutongGames.PlayMakerEditor.ProjectTools.GetPrefabGameObject (System.String prefabPath) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:152)
UnityEngine.Debug:LogException(Exception)
HutongGames.PlayMakerEditor.ProjectTools:GetPrefabGameObject(String) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:159)
HutongGames.PlayMakerEditor.ProjectTools:DoPreprocessPrefabFSMs(List`1) (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:278)
HutongGames.PlayMakerEditor.ProjectTools:DoPreprocessPrefabFSMsInBuild() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:115)
HutongGames.PlayMakerEditor.ProjectTools:PreprocessPrefabFSMs() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:57)
HutongGames.PlayMakerEditor.PlayMakerPreProcessBuild:OnPreprocessBuild(BuildReport) (at Assets/PlayMaker/Editor/PlayMakerBuildCallbacks.cs:31)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Details:
Unity 2021.2.9f1
Playmaker 1.9.4
Android platform