Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug 2022.02.0b9 Asset has disappeared while building player to 'globalgamemanagers.assets'

Discussion in '2022.2 Beta' started by StefanWo, Oct 1, 2022.

Thread Status:
Not open for further replies.
  1. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    When i start a build like normal, it shows me the following error.

    Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-43676'
    UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)


    WORKAROUND: After some search, i found some bugs from several years ago, showing a workaround: Close all Unity Windows, Restart Unity, directly start the compile without opening windows. => Worked... But not very useful :)

    Just opening the console brings that error again, so another restart is needed..

    ps.: Same at 2022.02.0b8 and 2022.02.0b9.
     
  2. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    I've had files disappear due to antivirus quarantine - solution for me was whitelisting engine and project folders. If doesn't help in your case, maybe helps someone else. I'm using 2022.2.0b9 as well but have had no such issue (so far).
     
  3. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    No antivirus in use here. Also why its working when unity starts with closed unity-tabs and directly the build is started :) So i think, it has to do something with unity itself.
     
    Last edited: Oct 1, 2022
    Haedal0916 likes this.
  4. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    Update: I Nailed it down to Console, Game and Scene Window. They has to be never opened, to prevent this error.
     
    jonas-thefullyarcade likes this.
  5. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,011
    I have same issue. Unity 2022.2.0b11 still has this issue.
    Windows : OK
    Mac Intel : Error
    Mac M1 : Error
    So I can't build iOS player :(
     
  6. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    236
    Same for me on 2022.2.0b15. It happens sometimes, but not always; usually it suffices to try building again.
     
    paragyogi likes this.
  7. Mic_Emond

    Mic_Emond

    Joined:
    Nov 16, 2016
    Posts:
    45
    We were getting the same, ever since 2022.2 beta.
    Waited out for the official 2022.2.0f1 release, but still getting the same.

    So +1 on this.
    It's preventing us from upgrading to the new tech stack. Which we want for Entities 1.0 and other editor ameliorations
    Anyone managed to fix this ?
     
  8. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    I also still got that error also with the 2022.2.0f1.
    @Mic_Emond: My workaround i mentioned in the first post is still working for me. Sometimes i need to restart one more time. Its pretty annoying, due to the compile took a very long time and it just crashes at the end of it...

    The Forum has been moved to achived now...
    Is anyone from Unity that have this bug noticed?

    Update: Looks like in Unity 2023.1.0a22 it seems not happening, but that editor crashes way too often for other reasons...
     
    Last edited: Dec 13, 2022
  9. Mic_Emond

    Mic_Emond

    Joined:
    Nov 16, 2016
    Posts:
    45
    @StefanWo Thanks for the confirmation.
    Sadly we're using a build machine and running builds through the command line and they still fail. (they also fail when trying from the editor locally)
    I've started a new thread in the "Editor" part of the forum since 2022.2 is out of beta now. But it's quickly getting burried.
    (here it is for anyone interested)
    https://forum.unity.com/threads/build-fails-after-update-to-2022-2-0f1.1373190/

    Going to 2023 isn't a good move for us as we'd like to ship within the 2022 LTS cycle
     
    StefanWo likes this.
  10. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    Thanks for posting it there too. I discovered some other forum entries, related to the UI-Package, that would make sens, that not using it in the editor fixes this issue somehow. In the new Version i had troubles even when i tried to do that, and it worked even with all windows open. Its really strange...

    I could fix it from time to time when playing around with packages, so adding and removing them. Than directly after the restart of the Editor, i can build it once without that error. It's also mentioned here as a workaround:
    https://forum.unity.com/threads/dot...ets-is-corrupted-in-standalone-build.1031437/

    Update: After its compiled, i get strange memory corruptions, maybe its related to it, maybe not. I have to downgrade again to Entities 0.51 to continue working... Hope this errors got fixed soon :(
     
    Last edited: Dec 14, 2022
  11. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    New Entities prev-44 with the recommended Unity version => still the same. But after compiling a 2. time it worked. No idea...

    I can't just remove the entities, due to i build my project on it.
     
  12. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    Using pre-65 and Unity 2022.2.13 => still the same... Anyone an idea what can be the cause of this strange bug, or ideas how to figure this out?
     
  13. stevemcilwain

    stevemcilwain

    Joined:
    Feb 21, 2021
    Posts:
    2
    Same bug here, Unity 2022.2.14f1... show stopper.
     
  14. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    Good to hear, that i'm not the only one :)

    I'm now on Unity 2022.2.16 and got once an additional other error: (the original one still appears when trying to build again)

    Code (CSharp):
    1. Building - Failed to write file: resources.assets
    Is this maybe somehow related?
     
  15. sinedsem

    sinedsem

    Joined:
    May 7, 2020
    Posts:
    9
    Same here with Unity 2022.2.19f1 and WebGL build.
     
  16. HECer

    HECer

    Joined:
    Mar 17, 2013
    Posts:
    46
    Same here with Unity 2022.2.21 building for Android:

    Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-128600'
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  17. rainwizerd

    rainwizerd

    Joined:
    Feb 19, 2020
    Posts:
    7
    Same bug on 2023.3.0 lts, can we get a Unity employee in here to help resolve? Pretty disruptive and unexpected in an lts release...
     
  18. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    91
    Hi! I've done some searching in our bug tracking and conversation history and it seems we do not have a bug that has repro steps that we can use to search for any bug inside unity. And there has been various efforts to find a response for this thread, but it seems no one was able to come up with something definite. So rather than leaving things silent I can at least give a little info of what we know.

    The GlobalGameManagers are singletons that encompass a lot of settings like Graphics Settings, Player Settings, Quality Settings, etc. E.g. This is info that is needed at Runtime as well as the Editor, but not associated with individual scenes.

    1 Player builds start by collecting the dependencies of the GlobalGameManagers.
    2 All the Scenes and Resources are built
    3 Finally the GlobalGameManager information is stripped down based on what is actually needed and the GlobalGameManager.asset is written.

    The issue is that at step 2 a lot Script code can execute, e.g. from build callbacks, from Awake() calls as the scenes are loaded etc. This can include code that is part of packages.

    The error is logged at step 3, and it indicates that some dependency that was accumulated in step 1 has gone missing, e.g. something destroyed an object in an unexpected way between step 1 and 3.

    Unfortunately the file path is empty and the instanceID is negative, which means that it the missing object has not been loaded from a file - it was created in memory. So there not enough error information from that message to pinpoint what data is involved.

    I know some comments here mention possibly of a source control or anti-virus cause. That may make sense and certainly worth considering. But for those cases of actual file system problems I would expect a non-empty path in the error message.

    Sorry I don't have a solution to suggestion, but I hope that explanation of what sort of problem can cause that error can possibly be helpful!
     
  19. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    I submitted IN-44206 case number for u to investigate this build error.
     
    AndrewSkow likes this.
  20. weareroyale

    weareroyale

    Joined:
    Oct 23, 2014
    Posts:
    4
    We are seeing this bug in Unity 2019.4.28f1 while building to iOS, in a project that previously built fine in 2019.4.12f1.
     
  21. TMThomsen

    TMThomsen

    Joined:
    Oct 27, 2018
    Posts:
    2
    We're seeing the same issue in version 2022.3.0.

    If the editor has been open for some time, the build process fails, but if you close and reopen Unity, the build always works. I have no idea what causes it.
     
  22. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,087
    I got as far as 2019.4.16f

    2019.4.17f and up seem to be the start of this problem. For me.... on a Mac, using Builtin, for iOS builds.
     
  23. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,087
    How about using some reasoning, insight and inquisitiveness into what and hows that could be causing this?
     
  24. travis-TAP-3D

    travis-TAP-3D

    Joined:
    Sep 12, 2022
    Posts:
    22
    This is still occurring for me as of 2022.3.5f1 fwiw. If I close the editor and build again its fine but that's a hacky workaround. (WebGL builds)
     
  25. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    91
    levoxtrip and optimise like this.
  26. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    :eek: Currently at latest 2022.3.6f1 my project when trying to build player runtime sometimes will get another weird fatal error that tells me splash screen cache at Library is missing and then crash.
     
    Last edited: Aug 3, 2023
  27. kostya_lutsuk

    kostya_lutsuk

    Joined:
    Dec 18, 2020
    Posts:
    10
    We have the same error while building standalone. Android and iOS don't have this problem.

    Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-379362'
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  28. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    The raise of this bug getting now more and more random. It seems for me it helps just to retry over and over again, till its working. Sometimes it need 5 tries to finish successfully. Sometimes its failing directly after another build for another platform was successful.

    For everyone who also have a custom build script, here my quick dirty "workaround":

    Code (CSharp):
    1.  
    2.        var unityBugAppeared = false;
    3.         Application.LogCallback onLogMessage = (string condition, string stackTrace, LogType type) => {
    4.             if (type == LogType.Error && condition.Contains("globalgamemanagers.assets")) {
    5.                 Debug.Log("Detected Unity bug. Marking for retry");
    6.                 unityBugAppeared = true;
    7.             }
    8.         };
    9.         Application.logMessageReceived += onLogMessage;
    10.         Application.logMessageReceivedThreaded += onLogMessage;
    11.         UnityEditor.Build.Reporting.BuildReport report;
    12.         try {
    13.             report = BuildPipeline.BuildPlayer(options);
    14.         } finally {
    15.             Application.logMessageReceived -= onLogMessage;
    16.             Application.logMessageReceivedThreaded -= onLogMessage;
    17.         }
    18.  
     
  29. AndrewSkow

    AndrewSkow

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    91
    I've got a bit more specific advice from another Unity developer which may be a helpful follow up to my earlier posts:

    This error typically means that, during a callback or event, some script is destroying an object that is referenced by one of the singletons (Graphics Settings, Quality Settings, Project Settings, etc) that are stored in globalgamemanagers.assets.

    A good place to look for problematic code is in any usage of the attributes [ExecuteAlways] or [ExecuteInEditMode].
    Those will also be triggered during the build, as the scenes and assets are reserialized for the target platform, but that is not a safe time to change anything outside of the Asset itself. There are also the Build callbacks, e.g. IProcessSceneWithReport

    Fixing this problem may involve checking BuildPipeline-isBuildingPlayer inside the method, and potentially disabling any action it performs when invoked during a build. E.g. in particular keeping an eye out for anything that might be deleting objects related to project settings.
     
    samol2014 likes this.
  30. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    From the QA reply mentions that it's caused by official package that needs to fix by official. Anyway I think Unity editor needs to improve to make it able to just log the exact error that tells u which code with line number goes wrong.
     
    samol2014 and StefanWo like this.
  31. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    We need some help here. How could we narrow down the investigation? I'm not sure what to look for, or where to look for it.

    Could we dump all instance IDs in a text file at end of step 1, to get more information about he culprit? Could this work?
     
  32. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    Hi @AndrewSkow
    So I have dumped all instances IDs just like I said in my previous post.
    I found that on one of my case where the bug happened, the missing instance ID was -10690280, I couldn't not find it in my dumps, but I found two instance IDs nearest to that number:
    PreloadData : -10690284
    PreloadData : -10690282

    Could PreloadData be a clue of what could happen? Could it be something to investigate for?
    The only thing I can find in Unity official documentation is https://docs.unity3d.com/Manual/ClassIDReference.html where PreloadData appears in a list.
     
    StefanWo likes this.
  33. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    We really need some help here from Unity team. We can't simply try to blindly understand what could go wrong in a process we can't diagnosticate properly.
     
  34. David_WangLei

    David_WangLei

    Unity Technologies

    Joined:
    Jun 16, 2021
    Posts:
    1
    Recently I encountered this issue in an internal project. It seems related to the SplashScreen cache. The phenomenon is, during the building process a cache file will be generated under Library\SplashScreenCache\55 but soon it's been deleted. I can not reproduce this issue steadily or in a demo project. I can reopen the project and/or change the Splash Screen Logos settings to by-pass this issue. Hope this helps.
     
    optimise likes this.
  35. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    I think u mean this issue as shown at screenshot below? At latest 2022.3.15f1, splash screen has been deleted is one of the issue that I encounter during building android player runtime meanwhile “Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-xxxxxx'“ is another issue that encounter it quite frequently when building windows player runtime and windows dedicated server player runtime and rarely happen when building android player runtime.

    upload_2023-12-15_19-40-48.png
     
  36. CubeJaw

    CubeJaw

    Joined:
    Jan 17, 2020
    Posts:
    5
    just started getting this after installing netcode for gameobjects
     
  37. FibriZzo

    FibriZzo

    Joined:
    Feb 2, 2014
    Posts:
    18
    For us, it's happening after upgrading our whole project from 2021.3.7f1 to 2022.3.17f1.

    It did work one time and created the build, but the rest of the times it always has the same "Asset has disappeared while building player to 'globalgamemanagers.assets'" error.

    I'll try creating builds with NO splash screen (from recent posts) and from the console windows.

    I will update this post when the build is over, so you have more info.
     
  38. pavel_luden

    pavel_luden

    Joined:
    Apr 19, 2018
    Posts:
    6
    Got this error in 2022.3.14f1
    Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-1569036'

    We don't use dots/entities/uitoolkit and other modern stuff.
    Reproduced only for UWP BuildTarget.WSAPlayer build, only in batch mode. Not reproduced when build started from editor UI, not reproduced for android builds in batch mode.
    Reproduced on every build, so it was a blocked for our Jenkins build machines.
    The computer is fresh from the store, with intel 12800 and 32gb ram. I am almost certain, the faulty hardware is not a culprit here.
    Was not ever reproduced before we updated to unity 2022 from 2021.3.17f1

    The solution was to disable "Parallel import"
    editor -> project settings -> editor -> parallel import
    Now it is not reproduced
     
  39. EnigmaFactory

    EnigmaFactory

    Joined:
    Dec 10, 2011
    Posts:
    98
    Was excited to find this new lead, but found our Parallel Import was already off. We attempted toggling and building both ways and still encountering the error. Spamming the build in errors in seeing incredible memory build ups (managed 33.8 gb of Editor usage)

    This one still remains an issue for us.
     
  40. ZurielA

    ZurielA

    Joined:
    Oct 19, 2021
    Posts:
    11
    Asset has disappeared while building player to 'globalgamemanagers.assets' - path '', instancedID '-326482'
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    Error building Player: 2 errors

    Build completed with a result of 'Failed' in 54 seconds (53606 ms)
    3 errors
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)


    if i quit Unity, delete my build folder, open, and build

    Build completed with a result of 'Succeeded' in 112 seconds (112400 ms)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  41. BenIVRE

    BenIVRE

    Joined:
    Jun 25, 2020
    Posts:
    6
    We were seeing this issue on our build machines for MacOS and Android builds. The only ones that worked were Windows and iOS. iOS runs on the same build agent as MacOS, and all the Android ones run on the same agent as Windows. It seemed to be the same asset that goes missing on all builds.

    I opened this prefab and forced a resave of the asset. As we'd updated the version of Unity, there were some meta changes to the file that needed to be committed to source control. After that, the builds all completed as expected.
     
  42. dm_bond

    dm_bond

    Joined:
    Sep 19, 2011
    Posts:
    62
    Probably my case is atypical, but maybe those who will read this many threads with disappearing assets during build, will see something useful in it.
    So, I'm in Windows with Editor 2021.2.4 (so old, because I need to fit in a 20 MB instant for Google Play), build accordingly under Android. Not many changes relative to the previous commit - int in the script of one of the prefabs, a few scripts that couldn't affect anything. I get a stable error

    Asset has disappeared while building player to '00000000000000000000000000000000' - path ''

    with changing instancedID. Nothing useful in Editor.log. I start reading about possible causes. I delete Library, to no avail. I investigate the build report via Project Auditor, which extends the search to globalgamemanagers.assets. I do Clean Build from Build Settings, the error changes to

    Asset has disappeared while building player to 'resources.assets' - path ''

    which narrows it down a bit. I start checking prefabs in Resources folder and find one with serialized reference to ScriptableObject (with fonts), which should not be there. The fonts have been moved to AssetBundle to be loaded later. The code in this place looks like this
    Code (CSharp):
    1. #if ENABLE_TMP
    2.     public List<TMP_FontAsset> fonts;
    3. #else
    4.     AssetBundle bundleFonts;
    5.     public FontRepository fonts;
    6. #endif
    Because the field name was the same, Rider helpfully added a FormerlySerializedAs(), which I removed as unnecessary and automatically attached ScriptableObject FontRepository to the prefab with this script, which escaped my attention. Eventually my problem was solved by adding [NonSerialized] to the

    public FontRepository fonts;

    End of story.
     
  43. LtKelleyUSMC

    LtKelleyUSMC

    Joined:
    Oct 6, 2012
    Posts:
    45
    I just ran into this SAME PROBLEM, with the SAME ERROR, using 2022.3.19f
    [SOLUTION] Restart Unity, did a build, and the build completed with NO ERRORS. This is starting to be like Microsoft Windows, where they do an update, and Windows is not working correctly, because someone in the Update Team, working on the UPDATE, forgot to take out something he was testing.
     
  44. kaliyo

    kaliyo

    Joined:
    Dec 8, 2015
    Posts:
    10
    Just got this error in 2022.3.22f
     
  45. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    Good News: It looks like in the 2023 Version the bug is gone. I updated some days ago, did several compiles, and never got any of these annoying compile issues!!! (now at 2023.2.18f1)

    But it looks there are some other issues, i got GPU crashes and the editor looks a bit more unstable, also 3-4 other bugs comming up. But the most annoying bug mentioned here is gone :)
     
  46. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,292
    Thread locked. The beta section for 2022.2 is now closed. Please start a new thread if you wish to continue the discussion.
     
Thread Status:
Not open for further replies.