- Home /
Questions about building game
Why is my game not changing textures in build version? It works in editor mode, here is the code:
Renderer renderer = gameObject.GetComponent(); renderer.material.EnableKeyword("_DETAIL_MULX2"); renderer.material.SetTexture("_DetailAlbedoMap", cracked0);
Has anyone experienced a degrade in quality of audio clips when building their game? The sounds sound muffled and distorted a little in the built version.
Is there a option to change the graphics quality setting when building webgl? I noticed shadows are not being rendered and the lighting is off.
Edit
Questions 2. and 3. have been answered, just don't understand question 1.
Do i need to include my textures in the res folder? Even if I have them referenced in script?
Answer by MekanYsmos · Jan 05, 2018 at 10:08 AM
I think this:
Renderer renderer = gameObject.GetComponent();
Should be like this:
Renderer renderer = gameObject.GetComponent<Renderer>();
Maybe i'm wrong, but try that :)
Ah sorry my bad, I put the wrong code here. Renderer renderer = gameObject.GetComponent<Renderer>();
is what I have already.
Answer by niorg2606 · Jan 05, 2018 at 01:23 PM
Answered by @LuFerSan
Check the audio in the Project tab. Usually, it has something to do with compression, so I would play around with those. Also, I would take a look at the Audio settings in Edit>Project Settings>Audio.
Check Edit>Project Settings>Graphics/Quality and make sure you have everything set to the highest levels. WebGL Isn't the best when it comes to building, but then again, I've only gained that from personal experience.
Thanks for helping me, still stuck on my first question though. I am beginning to think it is probably something to do with the graphic settings so I will play around with those.
Your answer
Follow this Question
Related Questions
How can I get my audio files to work for WEBGL build? 2 Answers
video-audio not playing in build (i tried webgl and android) 0 Answers
WebGl build keeps failing 0 Answers
Missing GUI button textures in build. 1 Answer
Distribute terrain in zones 3 Answers