Jump to content

How to stop Gaia Runtime from being recreated in my hierarchy


mroshaw
Go to solution Solved by Bryan,

Recommended Posts

Hello!

 

I'm looking at using alternative Lighting and Water assets in my scene. I'm also no longer using Flora. I can't see any reason to keep Gaia Runtime components in my scene, so I deleted the Gaia Runtime gameobject.

 

Something keeps re-creating it, no matter what I do. I just want to remove it - I have no need for Gaia runtime components in my scene.

 

Can you let me know how to permanently remove the Gaia Runtime, without it recreated itself somehow?

 

Thanks!

 

Link to comment
Share on other sites

  • Solution

Any thing you use in Gaia will create this. 
One option for you would be to use a different project for Gaia. 
Then create your worlds and export that to your current project. 
If you are not planning on using any of the Gaia system this is a great way to clean your project. 

Additionally, you could set the runtime components to none. 
Lock the session manager from recording, then delete it. 

 

Link to comment
Share on other sites

  • 3 weeks later...

I have the same problem.  I want to use Gaia spawners, but none of the other bells and whistles.

 

How can I reduce the footprint of the runtime?  I set all the options to None. Then Created the runtime in my scene. But it adds  several game objects for water, etc. Is it safe to delete these?

 

Also, what does the runtime do when I run my project? Is it going to interfere with anything?

 

Running two projects would add too much overhead. I would like to reduce the runtime footprint to its minimal attack profile and then remove it when I have finished building each terrain tile.

 

Suggestion: Make Gaia more modular. It is very invasive.

Link to comment
Share on other sites

I just had a thought on this.  What if I just added the following to the top of the methods that execute.  I think I would just need to add this to the MonoBehavior methods in GaiaGlobal, TerrainLoaderManager and Spawner.  Would this work?

 

if(Application.isPlaying) return;

 

 

Link to comment
Share on other sites

You can remove these elements if you plan on only use Gaia for spawning vegetation, textures, and gameobjects.
Just note that you cant use anything that requires a Gaia system. 

Lighting 
Water
Audio 
Weather
Flora 
Streaming 

These all require Gaia. 
If you are planning on using any of these then you would need the Gaia Custom Player or one of the Preset Players. 
If you are not going to use them then deleting the pretty much anything from Gaia is fine after you are done creating your worlds. 

Elements of the Gaia runtime will still be there, the reason for this is because we create like a backup of your world with the session manager which is in the Runtime. 

You can however lock this operation and then delete it. 
Same with the other runtime elements. 

Hopefully this helps! 

  • Like 1
Link to comment
Share on other sites

Thanks Bryan.  That helps a lot 🙂

 

I might have this wrong, But I believe the "Gaia Runtime" and "Gaia Tools" game objects need to be in the scene for me to use the spawners. Otherwise if I delete them with a spawner in the scene, Gaia will recreate these game objects.

 

So while I am building the scene and testing my game, these need to persist.  I can only remove them once I have completed building the scene.

 

To minimise the disruption to my workflow, I changed all the components on the runtime/tools gameobjects monobehaviour events so that they don't execute in play mode. Like the below example. 

When I hit play this will disable the components when the first MonoBehavior event executes, ensuring there is no performance hit.
 

Hopefully, this all works and doesn't break anything.

 

#if UNITY_EDITOR
        private void Update()
        {
            if (UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode)
            {
                this.enabled = false;
            }
            else
            {
                UpdateE();
            }
        }
#endif
        private void UpdateE()
        {
  			... Original Update Code
		}

 

Link to comment
Share on other sites

Oh gotcha, and yes you are right. 
You will need to keep these elements until you are done and then you can remove them or do what you are doing. 

 

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