Jump to content

Recommended Posts

Posted

Hi,

Currently, I encountered a problem about loading assets during runtime. 

I'm currently working on a mobile project, so I used gaia pro 2023 to create a scene, and that scene is about 500MB  in size(which is too large for an apk). Therefore,  our project is using hot update to reduce initial apk size. 

The issues is that when we download assets from hot update, and entered the scene. the texture will become transparent( or I should say ground texture lost, look like character is standing on mid air). I could still enter the scene, no crash or anything. 

Have you guys heard this problem before with hot update? because everything else were fine using hot update.

Posted

This could be so many things its hard to say. 
I would start off by suggesting to look at the shaders that are included in the build and make sure that the terrain shaders are included. 

 

Posted

yep, found out something was wrong with the shader. And we still trying to figure out how to solve.

Posted

There should be a list that you can force it to be included. 

unless its a problem within the shader itself 

Posted

image.png.e42a326aa39981138e43aced004bfde6.png

this is how it looks right now, only terrian texture lost. everything else was alright. we are pretty sure that we included everything

Posted

image.png.713d452ee19ab77f0fee0eaa2f958a33.png

and in other secene,  any possible reason for the terrian reflects light so much. What possible place should we check to reduce the reflection?

Posted

Hi @Nutshell, I am not that familiar with the "hot update" mechanism, but if you are loading in the terrains during runtime after the build was created, chances are that Unity did not include the terrain shader (or the right variant for it) into the build - this is often a problem when terrain scenes are being loaded in dynamically, e.g. through adressables or other means.

What you can do in this case is one of the following:

 

  • Include the terrain shader in the list of "Always included shaders" in the project graphics settings. This has the downside that the first compilation after that will take some time as unity will compile all possible variants for that shader.
  • You can save the "currently known" shader variants into a shader variant collection file and link it in the project's graphics settings in the "preloaded shaders" list. Make sure that your terrain was rendered in the editor, then use the "Save To asset" button and save the shader variant file in the list of "Preloaded Shaders".
  • Add a dummy terrain in an empty scene and add it to the list of scenes in your build settings
  • Create a material that uses the terrain shader, and make sure it is used in the build by e.g. referencing it in a script or scriptable object somewhere that gets pulled in the build. You could also put the material in a folder called "Resources" and it should be pulled in the build as as well ("Resources" is one of the "magic" folder names in Unity)

Regarding the terrain being too shiny - one possible source for that would be the smoothness on the Terrain Layer, but it could also be post processing settings or other settings of your lighting setup.

 

Posted
4 hours ago, Peter said:

Hi @Nutshell, I am not that familiar with the "hot update" mechanism, but if you are loading in the terrains during runtime after the build was created, chances are that Unity did not include the terrain shader (or the right variant for it) into the build - this is often a problem when terrain scenes are being loaded in dynamically, e.g. through adressables or other means.

What you can do in this case is one of the following:

 

  • Include the terrain shader in the list of "Always included shaders" in the project graphics settings. This has the downside that the first compilation after that will take some time as unity will compile all possible variants for that shader.
  • You can save the "currently known" shader variants into a shader variant collection file and link it in the project's graphics settings in the "preloaded shaders" list. Make sure that your terrain was rendered in the editor, then use the "Save To asset" button and save the shader variant file in the list of "Preloaded Shaders".
  • Add a dummy terrain in an empty scene and add it to the list of scenes in your build settings
  • Create a material that uses the terrain shader, and make sure it is used in the build by e.g. referencing it in a script or scriptable object somewhere that gets pulled in the build. You could also put the material in a folder called "Resources" and it should be pulled in the build as as well ("Resources" is one of the "magic" folder names in Unity)

Regarding the terrain being too shiny - one possible source for that would be the smoothness on the Terrain Layer, but it could also be post processing settings or other settings of your lighting setup.

 

Thank you, very appreciated. We will check 🙂

  • Like 1
Posted

Please let us know if we can further assist you! 

Posted
On 8/8/2024 at 12:36 PM, Bryan said:

Please let us know if we can further assist you! 

thank you for asking. And for now, we just included all assets within inital apk. We've decided to put this issue aside for now.  

Posted

Thank you for letting me know! 
I will leave this open just in case we need to re-go through it together. 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • STORM is here!

    STORM supercharges Unity to render massive open AAA worlds—on mobile and desktop—up to 10 times faster.

    STORM is your go-to tool for game makers and studios who are serious about performance and profitability.

  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
×
×
  • Create New...