Jump to content

Terrain Loader does not load in scene view


Gustavo
Go to solution Solved by DonCapone,

Recommended Posts

Hello, my multi tile scene with custom player was working fine but I change the runtime just to change time of the day.

Now the scene does not load when i am in the scene view. it does work in runtime though.

 

muy custom player appears 3 times now.

image.thumb.png.a6313ab0be1afe07b94e33d082cb71e6.png

 

and if i load all the scenes or just one it does nothing.

image.thumb.png.b25e72067904391748e7c4c6dac561fe.png

 

In the player there is the terrain loader script

image.thumb.png.f8247b3731ff08b126c5c80f40cffd57.png

 

I dont know what to check...Would you give me a tip?

Thank you!!!

Link to comment
Share on other sites

To complete this problem:

Now I have to loaders from the same Custom Player:

image.thumb.png.f3e75b08be78d6832fa368192b524ce9.png

 

the first one is linked to the player instance in the scene while the other one is linked to Prefab of the player.

Is that normal? How Can I fix this?

Link to comment
Share on other sites

Hi @Gustavo I noticed that there seems to be an error message being spammed in the console non-stop - can you identify where that error is coming from and temporarily deactivate the script that causes the error? It could potentially be that this error prevents the terrain scenes from loading properly depending on when it occurs.
Regarding the multiple loaders: The list contains all instances of Terrain Loader scripts in the scene. When you click "Select Loader" it should select the Game Object that contains that script. If you click "Select Loader" for the two entries, do they point to the same object or two different objects? If it is the same object, could it be that it has the terrain loader component attached to it twice?

Link to comment
Share on other sites

Hi, Yes I cleaned my console for errors but it still get the same behaviour.

In terrain loader manager I have 2 fields that mention my custom player.

image.thumb.png.30c7f7bdacdf135d1b435047f5ebb5a2.png

 

 

One of the custom player "select loader" links to my instance in the scene but the other is linked to the prefab, which is weird.

Another wierd thing is that  in the terrain loader manager when I disable the Custom player, it alse disable the custom player that was linked in the scene so that my terrain does not get loaded at all. In conclution I cannot disable nor delete this second apparence of tthe custom player in the terrain loader manager.

I checked also and there is only one "terrain loader"script in my player.

This thing already happend to me many time with gaia and I ended up re doing my terrains al over again. 

This time I must figure it out!

 

Link to comment
Share on other sites

Hi @Gustavo, I checked and it is "normal" or "correct" that a Terrain Loader script on a prefab will also show up in the list of Terrain Loaders. It makes sense from a programming perspective as the list is created from "all loaders that can be found" but from a usability perspective I think we only should display the ones that are actually in the scene.
Regardless of that I found that this should not influence the loader on the prefab instance in the scene, it should still work regardless. Could you please try the following to get rid off the duplicate entry:

Select the prefab in the asset hierarchy, and remove the terrain loader component from there. Then select the player in your scene, and add the Terrain Loader component there again. Then set up a loading distance in the terrain loader, and tmake sure it is set to runtime always. The result should be that the terrain loader is removed from the prefab, but should still exist as an override in the player prefab instance in the scene. In this way, the loader should appear only once in the list of loaders.

Regarding the scenes not loading in the scene view: Do the scenes load when you unfold the scene view panel and you enter a high loading range? You can also test if it works if you switch from "World Origin" to "Scene View Camera" and you move close to the terrain in question.

image.png

 

Link to comment
Share on other sites

no i

On 1/2/2023 at 10:01 AM, Peter said:

Hi @Gustavo, I checked and it is "normal" or "correct" that a Terrain Loader script on a prefab will also show up in the list of Terrain Loaders. It makes sense from a programming perspective as the list is created from "all loaders that can be found" but from a usability perspective I think we only should display the ones that are actually in the scene.
Regardless of that I found that this should not influence the loader on the prefab instance in the scene, it should still work regardless. Could you please try the following to get rid off the duplicate entry:

Select the prefab in the asset hierarchy, and remove the terrain loader component from there. Then select the player in your scene, and add the Terrain Loader component there again. Then set up a loading distance in the terrain loader, and tmake sure it is set to runtime always. The result should be that the terrain loader is removed from the prefab, but should still exist as an override in the player prefab instance in the scene. In this way, the loader should appear only once in the list of loaders.

 

.If this is normal i do not worry. I thought that this duplication was indicating some kind of error.



Regarding the scenes not loading in the scene view: Do the scenes load when you unfold the scene view panel and you enter a high loading range? You can also test if it works if you switch from "World Origin" to "Scene View Camera" and you move close to the terrain in question.

image.png

 

I tryied this and did not work.

I also did this on another new level form scratch and happed again. One you create a multi tile scene you cannot edit the runtime (using custom player). 

please try it yourself. 

Thanks for the help

Link to comment
Share on other sites

  • 2 weeks later...

I Still have the same problem where my scenes does not get loaded. BUT i managed thus by adding the scenes manually averytime i open my scene:

 

 

image.thumb.png.7868a4deb5ebc97ecb6e7b5b53df7ed5.png

 

 

I know this does not solve the problem but i allows me to keep on working.

best regards

Link to comment
Share on other sites

I realize I have another issue:

When I load my scene (which has scenes as tiles), the loading screen does not go off, even though the scene gots fully loaded.

 

image.thumb.png.4ab6e57eeb2db03fab070643846372b0.png

 

How Can I control the load of this first terrain? It is driving me crazy! there is no error from GAIA.

I even delete this screen and then creating (again) the runtime form my custom player it gets replaced.

Would you gide me how to use this tools? it seems that some how terrain loader stops working and there is no way I can test it.

 

Link to comment
Share on other sites

Another Aproach is to load myself the first level_1_0 and ALSO the first scene with the terrain.

Sometimes it works, but other time the first terrain scene gets duplicated.

I dont know how to work with this.... Please Help me!!!!

 

Link to comment
Share on other sites

Where does the player live? 
Does he live / setup in the first playable scene or is he dragged from like a character selection screen before being applied to the game scene? 

What I am guessing needs to happen is your character doesnt live in the playable scene because you need to load to different levels. This would mean you need to setup some more work for your player to work correctly, which would require you to create a script for your player to load into that scene. 

You can do this through the GaiaAPI. We have classes in the api for this in particular situation. 

Link to comment
Share on other sites

Hello Bryan!

The player exists in each level and is is assign as the custom player in the runtime creation of all the terrians.

This works fine! The problem arises when I try to create again the runtime to change the lighting, time of the day, wind or whatever. In that case, the terrians does not load again in the scene (even pressing load all button), but they do in runtime.

Another effect is that the scene loading page does not go off when fully loaded the first terrain.

 

If you can not duplicate this situation, at least you can help me by tell me what to check in gaia beacuse it is clear that something got out of place.

 

thank you!!

Link to comment
Share on other sites

Yes Bryan, I do.

In fact, If I start al over and create my multi tile tarrain again, this all thing works perfecly. The only solution upto now for me was to start all over and place every item in my scenes all over.

I think I need to know where to check if the custom player is ok recognize by gaia, idem with the camera etc...

 

Link to comment
Share on other sites

That is a good idea. 
You may want to bring you character into another project just to test this along with Gaia. 
Make sure that the player is working correctly. 

It could be that another asset is conflicting with the character. 

 

Link to comment
Share on other sites

I tried my custom player in a gaia new scene like the one that was broken and it worked fine.

The problem arise when for intance, i remove the gaia loading screen game object (just beacause) and then I try to re create again the gaia runtime in order gaia to fix everything. 

that  made the terrain loader no to load the terrain in the scene view( i does in rutime)and also does not finish load the screen(the slider does not fill) even though the scene is fully loaded.

Link to comment
Share on other sites

I think I know the problem:

I have a scene with 8 terrains and works perfectly. In the runtime I use my custom player.

This all set works perfectly. The scene gets loaded and the first terrian is loaded( it shows the black gaia loading screen with the green slider filling up).

NOW AFTER I JUST UPDATED MU PLAYER PREFAB. it does not work anymore: the terrains does not load in runtime and the black screendoes not go away. Also there is no indication in terrain manager that the scene got loaded fully.

I hope you can reproduce this.

I always end up re doing my 9 tile level over and over again!

 

Link to comment
Share on other sites

Another thing that would help  users is this:

image.thumb.png.4f49aad681f1d53cca51eddc136c6cdf.png

 

After trying to load any terrains and fail (nothing happens), there is no error or even warning of this process failing.

Link to comment
Share on other sites

I think what is causing problems:

When the runtime promps to drag the custom player, I use the one instance that is in the scene, which also is blue as is the prefabs. In other words, when I change the player prefab, this affects this instance as well (as it is blue).

So If I dont change the player prefab at all, it doesnt matter, GAIA and  UNITY will work fine. BUT if i make some changes in the prefab elewhere, in other scene or in this gaia scene, GAIA loses the custom player reference and terrain loader stops working.

In previous versions this was indicated, and you have to choose an instance of the custom player which was not linked to teh prefab.

image.thumb.png.78f33c429e2afe21e1cb1f6701907616.png

PLEASE CHECK THIS, IT IS WORKING FOR ME BUT IT IS A WORK AROUND.

BEST REGARDS

 

 

Link to comment
Share on other sites

Hi @Gustavo, thanks for your patience and supplying all the extra information. I did experiment a bit with a custom player and terrain loading and prefabs and editing prefabs, and I did figure out one way to reproduce the issue:

When the player object is being used as custom player, and you have a terrain loading scene, Gaia will add a terrain loader component to it. If the player is a prefab, that Terrain Loader component should become an override for that scene (indicated by the blue bar on the side and in the "Overrides" dropdown as well:

image.png

image.png

If things are added or changed on the prefab, that should then still be fine. If for some reasons however overrides on the prefab are reverted, this would strip off the terrain loader component from the prefab again, and terrains would not load during runtime anymore around the player. If you e.g. use the "Revert All" option on the override dropdown, that would remove the Terrain Loader and would break terrain loading in the scene.
Could you please describe which edits on the prefab lead to the state where it does not load anymore and if the terrain loader component is still on the player object after those edits?

Link to comment
Share on other sites

  • 11 months later...
  • Solution

If anyone have this problem, YOU MUST DELETE "GAIA RUNTIME", Gaia then create it automaticaly, and scene loading now working.

  • Like 1
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...