- Home /
Screen flashing only in hdrp build of game, editor works fine. Seems to be depended on amount of geometry in scene
Hi,
I am experiencing a very strange issue with a game I am working on. Everything works fine in the editor but as soon as I try to run a windows build, the screen starts flashing with purple shapes.
This is how my game window looks when I run the build: This is how it should look (and looks like in the unity editor):
After looking for the problem, I found that the game runs fine when I delete most of the game worlds geometry and just build about an eight of the current world. (the game takes place in one scene)
Also, the task manager shows 100% GPU usage when running the build and my computer is significantly slowed down. Again, none of this happens when I run the game in-engine.
I tried to limit frame rate by enabling V-sync, but it had no effect.
I am using Unity 2019.4.0f1 and HDRP
Here is the log file from running the problematic build:
Mono path[0] = 'D:/_My Stuff/Games/Resources/Boss Fighter/Builds/2020_06_12 Build04/Boss Fighter_Data/Managed' Mono config path = 'D:/_My Stuff/Games/Resources/Boss Fighter/Builds/2020_06_12 Build04/MonoBleedingEdge/etc' Loading player data from D:/_My Stuff/Games/Resources/Boss Fighter/Builds/2020_06_12 Build04/Boss Fighter_Data/data.unity3d Initialize engine version: 2019.4.0f1 (0af376155913) [Subsystems] Discovering subsystems at path D:/_My Stuff/Games/Resources/Boss Fighter/Builds/2020_06_12 Build04/Boss Fighter_Data/UnitySubsystems GfxDevice: creating device client; threaded=1 Direct3D: Version: Direct3D 11.0 [level 11.1] Renderer: NVIDIA GeForce GTX 1060 6GB (ID=0x1c03) Vendor:
VRAM: 6052 MB Driver: 26.21.14.4614 Begin MonoManager ReloadAssembly - Completed reload, in 0.054 seconds WARNING: Shader Unsupported: 'HDRP/Lit' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? D3D11 device created for Microsoft Media Foundation video decoding. Initializing input.
Input initialized.
Initialized touch support.
WARNING: Shader Unsupported: 'Hidden/Nature/Terrain/Utilities' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? ERROR: Shader Hidden/Nature/Terrain/Utilities shader is not supported on this GPU (none of subshaders/fallbacks are suitable) WARNING: Shader Unsupported: 'HDRP/LayeredLit' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'HDRP/Unlit' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/ShadGlow' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/Shad_Intersection' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/GrassSway' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/CalmWater' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/StreamFoam' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/ImpactFoam' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/InteractiveImpactFoam' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/Wyvern_ScarShader' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/StainedGlassShader' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/Cobweb' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/WaterfallFoam' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/WaterfallTipFoam' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/Waterfall' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/Shad_Magic_BossBarrier' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/Shad_GlowingVine' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/Shad_GiantMushroom_Stem' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/WisdomsEyeShader' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? UnloadTime: 0.439300 ms Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because there is no valid NavMesh (Filename: Line: 634)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
Failed to create agent because it is not close enough to the NavMesh (Filename: Line: 648)
NullReferenceException: Object reference not set to an instance of an object at UnityEngine.Rendering.HighDefinition.StaticLightingSky.UpdateCurrentStaticLightingSky () [0x00072] in :0 at UnityEngine.Rendering.HighDefinition.StaticLightingSky.OnEnable () [0x00000] in :0
(Filename: Line: 0)
Invalid bone hierarchy detected. IK requires for it's bones to be parented to each other in descending order. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
Scene with build index: 1 couldn't be loaded because it has not been added to the build settings. To add a scene to the build settings use the menu File->Build Settings... (Filename: Line: 162)
None of the warnings from the log file seem to have an effect on the build however, since they persist when running a build which is using just a small portion of the game world where the game runs fine.
I hope you can help me tackle this issue somehow,
Florian
Answer by FlorianHoll · Jun 17, 2020 at 07:19 AM
After doing some more research, I found out that there seems to be a 4gb limit to the size of your Unity scene.
I did not quite understand why this is or why unity doesn't tell me about it but I found my solution here: https://forum.unity.com/threads/bug-4gb-limit-to-textures-in-standalone-build.441116/#post-2897137
By using multiple scenes and loading them at the same time (SceneManager.LoadScene("sceneName", LoadSceneMode.Additive); every scenes size is under 4gb and no graphical glitches will occur.
Your answer
Follow this Question
Related Questions
Screen flickering on build 0 Answers
Workaround for the setresolution bug in unity 2.61 on the Mac? 1 Answer
make a loading screen 1 Answer
Find position of SelectionGrid element clicked 2 Answers
iPhone Screen Size 2 Answers