I've enabled a fog in the render settings on my scene. It works perfectly while testing it on the Unity editor, but after opening the game after building, the fog disappears. I'm not sure but according to some sources on the web, I found out that Unity3d has issues when running with Windows 8.1. Is there any way I can fix this?
I have just had this issue, it's incredibly annoying. What worked for me was going to the Graphics settings and changing the "Shader Stripping" fog modes to manual. I hope this helps someone else in the future.
To extend sraney's answer. Unity 2018 now look like this, if you change from "Automatic" to "Custom" it lets you select which shader to KEEP. In screenshot, I use only Linear mode so I only check that one.
Cause
This problem came from no scene in build list ever use fog setting (via Window -> Rendering -> Light Settings menu). Which happen to me because my game turn fog on/off via script.
Works for me. Edit, Project Settings, Graphics, Shader stripping, Fog modes:Manual. I confirmed this works fine on Ubuntu with Unity 5.4.1f1 The problem only happens during a build. It works fine without otherwise.
Code snippet for fog: void Start () { RenderSettings.fogColor = Camera.main.backgroundColor; RenderSettings.fogDensity = 0.03f; RenderSettings.fog = true; }
Worth mentioning to try and create a new camera if it still does not work after modifying the RenderSettings.
No matter what changes I made, it would not update until I replaced the camera with a new one.
© 2022 - 2024 — McMap. All rights reserved.
QualitySettings
set in the editor and for windows build? – Revolutionize