I’m using unity version 60000.0.41f1
When I try to run a scene or build a profile I get error message below:
BuildProfileContext asset exists but could not be loaded.
UnityEditor.EditorApplication:Internal_CallDelayFunctions ()
AND
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Build.Profile.BuildProfileContext.CreateOrLoad () (at <95707308f6f3498991e9df8902fe97ba>:0)
UnityEditor.Build.Profile.BuildProfileContext+<>c.<.cctor>b__30_0 () (at <95707308f6f3498991e9df8902fe97ba>:0)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <95707308f6f3498991e9df8902fe97ba>:0)
My build profile no longer has platforms or build profiles view photo below:
I’ve tried creating a new project under the same version, and everything is normal as it should be.
I’ve tried switching the project to a different unity version 60000.0.40f1 and still the same issue with no build profiles and no platforms showing up. (the project might be the issue)
I have a second computer(laptop) which I tried to check the build settings for the same project by using GitHub, everything works as it should on my laptop and its showing the build profiles and platforms.
I fully closed unity and reopened it, I restarted my desktop and the issue still remains
PLEASE NOTE: It was working fine earlier but while working on the project it just randomly stops working.
When I press add build profile nothing happens, all buttons there does nothing on the project with the issue
Interesting. I am also starting to get this issue randomly, and have removed the entire Library every time it occurs. Each time I think it is gone, it just randomly occurs again. I have tried to figure what I am doing the same each time prior to it happening, but I for the life of me cannot think of a single update or change that is the same each time. It is quite frustrating. I never had this issue until recently - granted the Build Profiles are a Unity 6 thing, correct? So… it feels somewhat broken still. As I have not seen an actual fix, other than retrofixing it by removing library (which seems to be the catch-all fix usually).
This happened to me overnight as I didn’t have the issue before until this morning when I booted up the desktop and opened my project. Luckily Enadar’s solution worked for me so thanks a bunch!
I’m using version 6000.0.46f1 and I don’t have much more context to provide other than that the project has two profiles that are targeted for android where one is for mobile AR and the other is for MR for use with meta HMDs. Both are using OpenXR and the XR Interaction Toolkit.
Same issue here, build profile randomly stopped working, window not showing up. Unity 6000.0.45f1 (project created with an earlier version of Unity 6)
Edit: The above trick does NOT work for me; also no error message in console. I can build & run, but not edit build profile anymore. ..
Edit: might be that I never build this project before, as it’s a test project for reporting Umity bugs. I was about to report a severe bug that only happens in build ;). Also deleting the whole library folder did not resolve the issue.
This is also happening to me. It is fixed by deleting the files listed in a comment but then the problem randomly returns. I think it started when I inadvertently edited the Project Settings in the Edit menu instead of going through Build Profiles.
Happened to me first time today, on Unity 6000.0.41f1. @Enadar your solution worked perfectly!
Saved me a lot of time!
Deleting \Library\ would be my last option… it takes 8h to import it all!
KingSkyline-DHG This appears to be correct and not an issue with BuildProfileContext
Could you try adding a build profile via the menu bar “Add Build Profile”? Alternatively, you can open Project Settings > Editor and disable the “Hide Classic Platforms” option.