Under review

how many tree i can handle it fast when loading?

cocowen 5 years ago updated 5 years ago 14

i use mapmagic spawn 300 tree , it take me 5s to loading the game ,but when i spawn 1500 trees , it always loading , at least 3mins ,i have to close unity , my plan is to create 5000 , what should i do 

i try to build the game to exe and it loading about 30s to load 1500 trees and work ok , seems just have problem when loading in unity?

Under review

The trees shouldn't take longer than a few seconds to load, they must be generating errors which is slowing down their loading speed. What version of Unity are you using?

its Unity 2017.3.0f3 (64-bit) 

i set 5000 tree and build it to exe files , its playing perfect without lag ,but take me 10-20mins to enter the game 

by the way ,i add the tree as object just like rocks when i use mapmagic,cause its not work as a tree 

You can look at the console window to see if there are any error or warning messages during the loading of the game. If there is no error or warning messages in the console, then you can also try using Unity's built-in "Profiler" to check to see exactly what function is causing the long loading delay. It definitely should not take longer than a few seconds to enter the game. The profiler will be able to show you which function is causing the delay. The profiler is part of Unity itself, and not part of my package, but if you do not know how to use the profiler then you can look on Google or youtube to find some tutorials on how to use the profiler. Let me know if you are able to determine which function is causing the most delay, and then we can try to figure out what specific line of code is generating the errors. To create such a long delay of 10 to 20 minutes, it must be creating many thousands of errors during the loading process. The profiler won't tell you which line of code is causing the errors, but it can tell you how much time was spent working on each function. Once we know which function is taking so long to load, then we can work to determine which line of code specifically.

when just open the scenes , i can find warning like this:

Assets/LushLOD Trees/Scripts/_LushLODTreesManager.cs(3163,38): warning CS0618: `UnityEngine.Light.isBaked' is obsolete: `Light.isBaked is no longer supported. Use Light.bakingOutput.isBaked (and other members of Light.bakingOutput) instead.'


The tree Alder couldn't be instanced because the prefab contains no valid mesh renderer.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

when loading the game,waring this:

The tree Alder couldn't be instanced because the prefab contains no valid mesh renderer.


TerrainCollider: MeshCollider is not supported on terrain at the moment.

by the way , i use STANDERD prefabs alder tree in the game.

Which version of Unity are you using? These errors should not be appearing, but probably are happening in the version of Unity that you are using. Ill need to update the trees to work on your Unity version, to fix these errors.

sorry for reply so late , have been busy with life stuff . the version of my unity is  2017.3.0f3

i still have problem with that

do i need to update unity to the  newer beta ? such as 2018?

Sorry for the late reply. Updating to 2018 won't fix this, I'll need to fix this on my end. I'll let you know once I've done the fix.

I loaded the project into 2017.3 and loaded the demo scene, and it didn't give me any error about the alder not having a mesh renderer. Could it be possible that you damaged the alder file? Maybe reinstalling the project file for the alder tree would solve that problem.

As for the light baking, that's an easy fix, I'll fix that error message and post an update soon with that change.

ok i will try to reinstall the plugin and reply later

i open the demo scene and there is no error, too , i am not sure how the error spawn in my scene


Since the time of my last comment 2 weeks ago, I've posted a major update to LushLOD Trees. It's now version 0.8, and there are new features, more controls over the way shadows are rendered in the leaves, and better handling of ambient light in the trees. But it will only install LushLOD version 0.8 if you have Unity 2018.1 or higher.

I will continue to fix bugs in older versions though, so if you still have problems with running the trees on Unity 2017, let me know. But just wanted to let you know that there's quite a nice update waiting for you when you do decide to upgrade to Unity 2018.1. :)

i was stupid , i forgot to delete the prefabs add to unity terrain tree manager ,now i fix the bug and there is no error ,but 500 tree still take 1mins to load ,i will update unity to 2018 and try again