Moving Build Profiles folder to my custom folder caused an issue

You may not pass in objects that are already persistent
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEditorInternal.InternalEditorUtility:SaveToSerializedFileAndForgetInternal (string,UnityEngine.Object[],bool)
UnityEditorInternal.InternalEditorUtility:SaveToSerializedFileAndForget (UnityEngine.Object[],string,bool) (at /Users/bokken/build/output/unity/unity/Editor/Mono/InternalEditorUtility.bindings.cs:271)
UnityEditor.Build.Profile.BuildProfileContext:OnDisable ()

This error gets printed every time I enter play mode and open the editor. I don’t know what I did besides from moving the Build Profiles folder to my custom path that is under the Assets of course.

Edit: I also get this warning when I first open Unity Editor:

Failed to load build profile from Library/BuildProfiles/PlatformProfile.0d2129357eac403d8b359c2dcbf82502.asset.
UnityEditor.Build.Profile.BuildProfileContext:OnEnable ()
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget (string)
UnityEditor.Build.Profile.BuildProfileContext:EnsureInitialized () (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildProfile/BuildProfileContext.cs:623)
1 Like

I have the exact same error message. For me it occurred when importing an asset from Asset Store. (Easy Save 3).

Edit: Solved for me by deleting build profiles

2 Likes

Hi! We’re working on a fix for this bug (which is a duplicate of an internal one) Unity Issue Tracker - "Failed to load build profile" warning is thrown when restarting the Editor after creating a new Build Profile that should fix this issue.

I’ll be sure to update this thread when the fix lands!

6 Likes