Jump to content

Enabling Flora System Causes Unity to Hang

Go to solution Solved by Diggidy,

Recommended Posts

As the title suggests, when I Enable the Flora System on a grass detail it cause Unity to hang and continually creates the Flora Data. 

I have an image

Link to comment
Share on other sites

The image shows windows explorer and all of the Flora System assets created for the one grass. The right side shows Unity frozen. 

Some more info, I have Grass spawners that I have created and used with no issues. I was attempting to create a new grass biome for plains and desert. I had added 4 grass details, when I clicked on resource settings of the 4th grass to mess with the flora data, Unity hung and it kept recreating the grass. Now it continually does this. I tried adding a new spawner, I can add 1 grass but thats it, any after that, Unity will hang and recreate the grass over and over again.

I am using Unity 2021.3.18f1

Link to comment
Share on other sites

I am also getting a lot of these errors, but they have been around for awhile.

NullReferenceException: Object reference not set to an instance of an object
ProceduralWorlds.Flora.FloraTerrainTile.Start () (at Assets/Procedural Worlds/Flora/Scripts/Runtime/FloraTerrainTile.cs:196)

Link to comment
Share on other sites

Hi @Diggidy,

I had a look at those issues and those were bugs / poor handling of the missing detail scriptable object in the flora configuration. There was an automatic fix that would add a detail scriptable object if it was missing, but that added another, new LOD to the spawn rule instead of fixing the existing one with the missing item. This resulted in an endless loop creating all the Flora system assets you saw.

To fix this, you can install this patch via
Assets > Import Package > Custom Package...
in the Editor:


This fix will then be included in the next update of Gaia as well.

Link to comment
Share on other sites

Unity doesnt hang anymore and the Flora Data doesnt get continually regenerated but the data in the Flora System gets deleted or reset.

What I did. 
1. I have a spawner with 1 detail grass, works fine.
2. I added another detail grass to the spawner and when I Enable Flora System the Flora Data on the first detail grass gets wiped or reset.

I attached an image of the wiped Flora Data

Link to comment
Share on other sites

Any word on a fix for this?
Is there a way to revert the Floral System to when it was working properly?

I have other spawners that use grass and I have used them in the past without incident (although I am afraid to use them now).

Link to comment
Share on other sites

Hi @Diggidy, I was looking into this but could not reproduce the issue so far: What I tried is:

1. Create a new spawner

2. Create a new spawn rule
3. Switch the resource type to Terrain Detail
4. Activate Flora settings for it
5. Duplicate the spawn rule

Result is that I have two spawn rules with Flora settings on it which both link to independent Flora detail settings objects


I also tried creating an additional rule instead of duplicating, and loading up an existing Gaia spawner (e.g. from the Alpine Meadow Biome) and duplicating and adding rules in there, but so far I did not get any flora setting to disappear.
Could you please describe the order of operations in a step-by-step fashion that makes the issue appear for you? Ideally it would be good if you test on a new spawner as well to rule out that is only specific to that single spawner.

Link to comment
Share on other sites

I did the following steps...

1. Start a new spawner
2. Added a terrain detail > Enable Flora System
3. Add another terrain detail > Enable Flora System

The first terrain detail data wipes.

I must add that I have been using other grass (terrain detail) spawners that I have created without any problems. This problem started when I was setting up a new grass (terrain detail) spawner. I really cant say that I did anything differently.

Link to comment
Share on other sites

  • Solution

I think I figured it out.
The 2 prefabs are sharing the same Material, so when I Enable Flora System the Source Data material would overwrite the first terrain detail. 

Need more testing but it appears to be fixed.

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