Jump to content

Impossible to generate a world


celestinlap

Recommended Posts

Hi ! Gaia worked fine in my project for a long time ! But now, when i click on generate a world, theres this error :

Error while exporting terrain from world map, Exception: Destroying the root game GameObject of a prefab is not permitted. Stack Trace:   at (wrapper managed-to-native) UnityEngine.Object.DestroyImmediate(UnityEngine.Object,bool)
  at Gaia.GaiaSessionManager.ExecuteClearWorld () [0x0009d] in C:\Projet Catalonia\Assets\Procedural Worlds\Gaia\Scripts\SessionSystem\GaiaSessionManager.cs:5202
  at Gaia.GaiaSessionManager.ClearWorld (System.Boolean executeNow) [0x00062] in C:\Projet Catalonia\Assets\Procedural Worlds\Gaia\Scripts\SessionSystem\GaiaSessionManager.cs:2400
  at Gaia.SpawnerEditor.StartExport () [0x000b8] in C:\Projet Catalonia\Assets\Procedural Worlds\Gaia\Scripts\Editor\SpawnerEditor.cs:3184
UnityEngine.Debug:LogError (object)
Gaia.SpawnerEditor:StartExport () (at Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:3235)
Gaia.SpawnerEditor:DrawWorldDesignerSpawnControls () (at Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:3925)
Gaia.SpawnerEditor:OnInspectorGUI () (at Assets/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:1625)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I updated Gaia and imported it again, same thing, it doesnt work.

Im using unity 2020.3.25f1 with URP, and i use Gaia Pro 2021 version 3.4.1

Thanks :))

Link to comment
Share on other sites

Hi @celestinlap,

we looked into this error and it is a bit strange: In this moment the Gaia Session Manager is trying to clear the world of old terrains, and it looks like it finds a terrain in your scene that does still have terrain data associated with it, but is not part of a game object - this is unusual, since normally all terrains have a gameobject that represents them in the scene as well. I could imagine that this might be caused by a custom script that works with abstract terrain objects that do not possess a game object in the scene (yet).
In any case I added extra safety checks so this error should not happen anymore in this patch:


Gaia2021SessionManagerNullrefHotfix.zip

You can install the contained unitypackage via Assets > Import Package > Custom Package in the Unity Editor.

Link to comment
Share on other sites

Hi @celestinlap, I had another look at this and I overlooked one crucial part of the error message before:
"
Destroying the root game GameObject of a prefab is not permitted"
Could it be that you have turned the terrain objects or a parent object into a prefab at some point? Or do you have other terrains that are stored as a prefab and are referenced in the scen?  If yes, this would explain the problem, when the Session Manager is looking for terrains in the scene it will also try to delete the prefabs itself which leads to the error message. I added another check in the hotfix that will make sure the terrain in question is actually an instance in the scene and not just a prefab, with this change I am able to create prefabs out of the terrains and can still call the world designer to make a new world over it:

Gaia2021SessionManagerNullrefHotfix2.zip

(You can install this patch over the old one, as it will just replace the previous version.)

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...