Jump to content

Build and Run Troubleshooting


Guidos

Recommended Posts

Hi all, I have a multi-tiled (9) Gaia world but if I build and run I just get a flickering screen. Ive tested Gaia with a new build of 4 tiles with the meadow biome and all is fine. So Im now troubleshooting what differences between the two projects could make the 9 tile version not work. 

I have discovered that the 4 tile build has the main scene (with world designer and gaia runtime) is located in assets/gaia user data/sessions/GS-xxxxxxxx-xxxxxx/Scene Profiles but my 9 tile is saved at /assets. So Ive snow re-saved the scene under scene profiles . Built and Run = flickering still. 

I've now also noticed that my terrain scenes name and the terrain scene asset file ends with '084321' but the session folder name where the terrains are stored ends with '084202'

Would this be an issue (see attached)

Thanks

Screen Shot 2022-03-15 at 09.48.45.png

Link to comment
Share on other sites

Through a process of elimination I have got the build to work with everything else except Gaia Pro. Ive then narrowed down the problem to something in, or connected to World Designer. 

Ive removed my custom biome and spawners and replaced with the Alpine Biome with just two of the spawners in the biome. 

World created and biome spawned. When I press the "create runtime" button at the bottom of the biome I get the (red) error: "error while creating gaia runtime setup: index was out of range. Must be non-negative and less than the size of the collection" - any ideas?

Alpine Meadow Biome set to 'Runtime Always' in Terrain loader (seems to want to be disabled for some reason).

If I ignore that and build and run with the terrain scenes all listed in the terrain loader and in the build list along with the main scene, the build loads but without any terrain and so the character falls through into the water. 

Any suggestions troubleshooting ideas gratefully received. 

 

Screen Shot 2022-03-15 at 14.29.41.png

Link to comment
Share on other sites

I'm using URP by the way.

Also, I noticed in the build and run tab that the scenes were "missing" so I've added them again. They are still present in the loading manager.

I really can't see why these terrains aren't loading.

I don't think it is anything to do with the biomes, as surely if the biomes had an issue the terrain would load anyway.

I've selectively turned off other items (although everything else does work when Gaia is removed).

So now Im left with a project that works exactly how I want it to in the editor play but can not make it to run time with the terrains loaded. 

Screen Shot 2022-03-16 at 08.04.02.png

Link to comment
Share on other sites

See above image, Ive added impostors to the terrains just in case this was an issue but it doesn't change anything. 

Link to comment
Share on other sites

"error while creating gaia runtime setup: index was out of range. Must be non-negative and less than the size of the collection" now gone so it isn't related. 

Link to comment
Share on other sites

So after you added the scenes to the build settings - are you unloading the terrains? 
You would want to make sure that the loaders are set correctly. 

I recommend taking a look at this: 

 

Link to comment
Share on other sites

Yes, Thank you.

I seem to have progress.  So by unloading the terrain in the editor and then building, the terrains load in the build runtime, although I'm not sure if I am getting all to load because of this.

The first terrain is loaded along with the biome but the character falls off when it walks to the next tile terrain. Not sure why yet but I'll do some investigating.

Ive also discovered that adding the Gaia third person (probably not the only option) also loads the terrains.

 

Question: while the article you posted above has a lot of valuable information I haven't come across a build and deploy tutorial as yet. So actions like unloading terrain in the editor are deep within separate documents. 

I think it would help if there was a generic build and deploy walkthrough, preferably a document as well as a video. Ive watched all the build videos but the actual deploy and run is leapt over, unless I'm mistaken. 

Link to comment
Share on other sites

I am now unloading the terrain in the terrain loader manager and when I create a build the terrain the player is on loads but the next terrain doesn't. I have no idea why. 

On comparing my build with a gaia build that has a Gaia third person character Ive noticed the character has the following extra components:

  • Gaia custom controller
  • Terrain loader script

Ive added these two components to my character player.

The terrain loader script makes the player character appear in the terrain loader manager and Ive set that to 'runtime always' but Im not sure how to add this to the terrains as a reference (some of the spawners appear under each terrain) but for now the terrain loader manager is listed as a reference so I assume that means any terrain loader referenced in the terrain loader list will / should trigger the terrain to load. 

The Gaia custom controller has the 'is player' box ticked. 

So I don't know if these two components are important (again, a tutorial on the build and deploy part of the build is missing as far as I can see) but it seems to make sense that the player character triggers the loading of terrain, although this hasn't been an issue while I built the world in the editor but maybe is critical in the build runtime, I don't know. 

 

What else am I missing to make the terrains load as the player character walks around the world? 

 

Link to comment
Share on other sites

@Guidos You should only need the Terrain Loader component on the player, and it should load terrains within its range settings during runtime when it is set to "Runtime Always". You would need to check the "Follow Transform" checkbox so that it follows the player around correctly, but that should be on by default.
You can double check if the range on the Terrain Loader component is large enough by looking at the black box in the scene view, everything that this box touches should be loaded during runtime:

image.png

Regarding building for terrain loading: There is essentially only two things required - the terrain scenes need to be in the scene list in the build settings. You can make sure this is the case by clicking the "Add Scenes To Build Settings" button in the terrain loader.
But beyond that you would only need a terrain loader component on the player, needs to be set to "Runtime Always" (as you have it already), needs to have a range set up and the "Follow Transform" checkbox on, there should not be more things required for making the terrain loading work in as build.

Link to comment
Share on other sites

Hi Peter, this has sorted my problem, thank you. It might have been that the default for the terrain loader scrip had 0 for loading ranges. 

While Im pretty sure this is now resolved I have some questions if I may;

1) What is the Gaia Custom Controller script for? it seems it is not required for running the Gaia world.

2) in the terrain loader manager, under each terrain listed, why are some terrain loaders referenced but some not? why do they need to be referenced if the terrain loader manager is referenced which has all the terrain loders listed anyway?

3) in addition to the above question, how do you set these terrain loaders to be referenced here?

4) is the world designer required to be listed as a terrain loader in the terrain loader manager?

Link to comment
Share on other sites

On 3/19/2022 at 3:12 AM, Guidos said:

1) What is the Gaia Custom Controller script for? it seems it is not required for running the Gaia world.

Its required if you wanted to use Gaia's systems; Water, lighting, etc. 
 

On 3/19/2022 at 3:12 AM, Guidos said:

2) in the terrain loader manager, under each terrain listed, why are some terrain loaders referenced but some not? why do they need to be referenced if the terrain loader manager is referenced which has all the terrain loders listed anyway?

Didnt quite understand this question but the terrain loader simply tells what Gaia Processes need to load that terrain. 
Ie When the stamper is enabled it should load the terrains that it would effect. This is to save Unity performance as Unity can not handle massive amounts of terrains at a single time. Some processes simply dont need to effect the terrains unless you need them to. Hopefully this answers your question. 
 

On 3/19/2022 at 3:12 AM, Guidos said:

3) in addition to the above question, how do you set these terrain loaders to be referenced here?

 

image.png

If a terrain loader is required it would show up here. Then select the drop down and chose the option that works for your needs. This document covers everything in regards to terrain loading: 

 

On 3/19/2022 at 3:12 AM, Guidos said:

4) is the world designer required to be listed as a terrain loader in the terrain loader manager?

You can set this to disabled if you are finished with the World Designer. 
 

Link to comment
Share on other sites

Thank you for your time both of you. I completed my MVP on my target date, so thank you for that.

I'm now focused on optimising and adding more features.

  • Like 1
Link to comment
Share on other sites

Thanks for letting us know the outcome! Feel free to ask more questions here or start a new thread when you encounter another challenge.

Link to comment
Share on other sites

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
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...