Hi, I am trying to build the project into a Web GL, but it throws 3 errors when it reaches the "Building additional assets" stage. Things to note: I do not use NGUI or any other third-party GUI solution, but Unity's new UI system I have tried versions 5.2.3 and higher and it still has returned me errors I have one DLL LitJson that is used to parse JSON files Project includes StreamingAssets and Resources folders Error occurs even if I try building on other platforms such as Windows. Same errors are returned I am using a font downloaded online Blacksmith's Character "Challenger" is also included I thought the project folder has been corrupt so I decided to migrate all assets to a clean project. No changes Any idea how do I fix these? Thanks in advance!
You have any UnityEditor code references in your scripts? because thats a nope. You will need to define those out for your compiles. Annoying yes.
I have discovered the issue was related to an editor extension code I made. My editor code is located inside of an "Editor" folder, which is supposed to not compile into the final build. To be sure, I wrapped all editor scripts into #if UNITY_EDITOR. Problem still persists.
Make sure you don't have Code (csharp): using UnityEditor; in any scripts included included in the build
It's not the editor script that is likely the problem. It's likely some other script outside your editor folder that references the editor script.
lol getting the same damn error now... at first it was being caused by a shader, but I finally got sick of recompiling that so deleted it. problem went away, now its back, but I have no idea whats driving it. Pretty sure I don't have any Editor references.
I had this error because there was a "Resources" folder, that stored all my skin items and sprite UI. Problem went away after I renamed it.
OK! so it turns out, if you enter play mode and build, you will get this problem. If you have not entered play mode, it will build continuously without issue. Only way to fix is restart Unity
@JamesLeeNZ I have the same issue: if I enter play mode and do a few things before making a build, I always get the following 2 errors: and Then running the build fails with the error and doesn't give any more information. I stripped the application of many plugins, components, and functionality it had, and I still get the same errors. These are some things I tried: - remove as many plugin DLLs as possible - remove as much System.Thread related as possible - surround everything that uses UnityEditor with #ifdef UNITY_EDITOR / #endif - remove any postprocessors - step-by-step remove from GraphicsSettings custom, legacy, and all shaders from always included shaders - remove custom shaders - in the Player settings disable auto-graphics API for Windows and set OpenGL for the application - remove guiskins - set shader stripping to manual and not stripping anything Do you or anyone know what could be the cause of this issue? The project was upgraded from Unity 4 to Unity 5, maybe that causes the problem? My real concern is that I don't know what is causing it, so it might hide a bigger issue that will only appear to users (I'm developing a commercial non-game application).
Hello, For me the problem was probably that I was running out of space on my disk. I deleted some files to get 1-2 GB more, tried to build again, and it worked. If it can help!
I'm having the issue but with a slight difference An asset is marked with HideFlags.DontSave but is included in the build: Asset: 'Library/unity editor resources' Asset name: DefaultReflectionForPrefabMode What on earth is DefaultReflectionForPrefabMode ???? I googled it but it seems it doesn't exist anywhere on this planet !! Every time I try to build it failed when it reaches the sharedasset0 and prompts this error.
Had this error in Unity 2018.3.1f1 and solved it by closing Unity, deleting the library and obj folders and restarting
I am having this issue too. Precisely with reference to "Asset name: DefaultReflectionForPrefabMode". Would be grand if someone can figure it out...
I finally figured it out what the issue was with DefaultReflectionForPrefabMode after spending a full day on it. So I went back in time and checked out all my previous repository commits to see where did it actually started to fail. and noticed on my last push that some scene changes were the only true change. so it hit me to just move everything I have in the scene to a new scene and boom it worked ! so Unity just wanted to mess with the scene ! Easy way is to Create a new scene, then grab the corrupted scene into the new one, move everything from there to the new scene then close and don't save the old scene !
I had the same problem, I removed all elements from the scene and removed all scripts, unfortunately the problem was all the time. I compared the scene file with the clean scene and it turned out that the problem was with the lights, it was enough to reset all settings in the light settings and the project could be built without errors
Hey guys, we encountered the issue with the DefaultReflectionForPrefabMode on our side. No idea why, but a Unity Editor asset got referenced in our scene's Lighting Settings. Only thing we are sure of is that we didn't put it there, it appeared in a commit where a level designer changed unrelated things. You can fix it without recreating the scenes by removing the reference to the Unity asset here:
@Raeion you deserve a medal dude! I've been trying to fix this issue for hours with no avail! Dragging all my scene content into a new scene fixed it right up!
I think that upgrading the "Universal RP" package from 7.3.1 (2019.4 verified) to 7.5.1 caused the issue for me. I'm using Unity 2019.4 right now. Maybe it was because I accidently changed the official Light2D script (but I don't think it's this). Now I'm changing all my packages to "2019.4 verified". To fix the issue, you have to change the "Environment Reflections" Source to Custom, and Cubemap to "None (Cubemap)". I tried the fix @KarimTA suggested and it works, but I first tried changing source to Skybox which doesn't work. I guess Universal RP automatically set this.
you guys just saved my time. I encountered this error just one hour before writing this post. Thank you
I love you guys, this issue droves me crazy. Thank you @KarimTA & @wlwlz changing the "Environment Reflections" Source to Custom is what made for me. Thank for your help
We ran into this bug today, the day before an important demo for potential investors! You saved our bacon. Thank you very much!
We have the same problem, but not same error. Maybe will help someone who have same issues/problems like this: Code (CSharp): An asset is marked with HideFlags.DontSave but is included in the build: Asset: 'Library/unity editor resources' Asset name: Folder Icon (You are probably referencing internal Unity data in your build.) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) Code (CSharp): Building - Failed to write file: 0000000000000000d000000000000000 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) It's because one (maybe more) prefab referencing it (the left one)
Is there any way to stop this DefaultReflectionForPrefabMode thing from being created? This error pops up for me intermittently and it's really annoying and time consuming sifting through every scene and find which one has auto added this file.
Yeah this worked. I created a new scene, copied all the objects from the old scene. The new scene compiles. After testing the standalone and crashing, I think I now know why the scene couldn't originally compile. One of my objects had a type mismatch in the inspector. No crash now.
All these fixes are bandage solutions. Unity keeps saying we AI this and AI that, what they need to do is to focus on making the Unity compiler more intelligent in pinpointing where the root of the problems occurred.