Lost Skybox in Streaming scene assetbundle
Hello;
I'm working on a VR app. I successfully created a streaming scene assetbundle and downloaded it to my project remotely. But I lose my Skybox. The Skybox turns purple when I download and load the streaming scene assetbundle.
Please advise.
Answer by Islam_Talha · Aug 18, 2019 at 01:45 PM
You need to add your shader in (Always Included Shaders) in Graphics. Do the shader can be stored in the Bundle. https://support.unity3d.com/hc/en-us/articles/208380753-Shaders-are-pink-when-loaded-from-an-AssetBundle
Answer by rstorm000 · May 12, 2017 at 12:38 PM
I'm dealing with this issue as well, it seems to be because of missing shaders across build platforms. Did you find any solutions?
Answer by IgorSimovic · Oct 21, 2017 at 12:19 AM
Ugly solution but works for me platform android shader Skybox / 6 Sided
I made an empty skybox (with no texture, to be light - at least that was idea) with proper shader (Skybox / 6 Sided)
then I set it as Skybox Material (Window\Lighting\Settings) on scene where custom skybox will be loaded at run-time
Then when it's time to set custom skybox with same shader as empty skybox i use code
Material material = assetBundleRequest.asset as Material; //loaded asset from assetBundle
material.shader = RenderSettings.skybox.shader; //set shader to loaded skybox
RenderSettings.skybox = material; //set skybox
Your answer
Follow this Question
Related Questions
AssetBundles miss static property 0 Answers
About shaders included in assetbundles 1 Answer
Resource update question 0 Answers