So, I found this issue in my game, And this is more of a “Trying to understand how it works” More than anything. I have had long loading times for the main scene (A large, open world scene) and i always figured it had something to do with the terrain size and some initializing scripts. However, I found that loading times are minimal once I get rid of the foliage.
Now, I will say, I just did a quick full map foliage tool. I know that is very lazy and counterproductive to performance, but i was just going to have something working and deal with it later.
Before removing the foliage, there were around a few hundred thousand (maybe 400k?, short/medium culling distance, around 20000 i think?) instances of JUST a grass object that i have. It’s just a few planes with a really low resolution texture applied to it. Like i said, i was just going to have something that worked and then clean it up later. There were a few things that came with this # of foliage instances.
- File Size: This many foliage instances made my scene file go from 1MB to ~1.2GB
- Loading time: The scene now took anywhere from 17-33 seconds to load. Time did not change when built (This is what led me to think it was the initializing scripts)
- Saving: With the foliage, saving took probably about the same time as loading, i did not check however.
- Without the foliage: Loading time is under 150ms, size is ~1MB, save is back to minimal
Like I said, this is more of a “How does it work” question, so i can see if i can think of a workaround if possible.