Terrain rendering breaks when loading the scene as an addressable asset

Hi :hot_beverage:

A few months ago, we started migrating most of our assets into addressable groups. We have a pretty solid setup now that avoids asset duplication in builds, can load things into our open world on demand, etc.

The final hurdle that I’m trying to overcome, is to make the scenes themselves addressable. We have two scenes - the main menu scene and the open world itself.

When I do a build where the scenes are included in the scene list directly, everything works fine. But when I move the scenes into addressables, I see issues related to terrain rendering.

One particular terrain layer (our beach areas) seem to have smoothness set to 1.0 and the entire surface is showing high reflectivity (SSR). Another layer (one of our dirt layers) have albedo pitch black.

The scene itself contains all the terrains directly. Other stuff is loaded in dynamically. So in the editor prior to build, the beach looks like this:

But in the build, the beach looks like this:

As you can see, the terrain layer is messed up, in this case smoothness it seems.

Has anyone come across such issues before, where having the scene loaded as an addressable will break terrain?

Additional (sort of implied) info: we have a loader scene that is always included in the build directly. The loader will correctly load the scene in either the built-in way, or as an addressable. The workflow doesn’t seem to be the issue here.

Thanks!

Some additional info…

When using the addressable assets workflow in the Editor (via the Play Mode Script setting), everything is fine too.

So I build the addressables, then use the addressable scene loading just as it would be in the build itself.

Terrain layers are OK:

So it really only breaks in the actual build itself.

sorry to bother, but have you find the cause/solution?

It was eventually resolved, but it’s difficult for me to remember how exactly. Apart from the terrain, I had a number of other weird issues as well. Some things to try:

  • Run your build and check the player log for errors and deal with anything unexpected.
  • After building addressables, check the report for duplicates (meaning addressable assets relying on non-addressable assets) and carefully bring everything into the addressables system, aiming for 100%.
  • I tried random nonsense like placing my terrain material in a Resources folder and loading it myself.
  • Finally, I coudn’t get the build to work flawlessly without an HDRP dummy scene. This scene includes a camera and visual volume, a basic terrain, etc. And this scene is not addressable. No matter what I tried, I needed this non-addressable HDRP scene for the HDRP assets to correctly include in the build.

Good luck!