Your comments

When I went to line number 2228 of my version of the _LushLODTreeConverter.cs file, it's a comment, not a line of code at all. But I have multiple versions of that file, for different versions of Unity. Let me know what version of Unity you are using. If you edited that file in any way, then you can email me a copy of your _LushLODTreeConverter.cs file, to my email address at aaronbrownlm@gmail.com, or just copy and paste the area of code where the error is, right here as a reply, so I can see what line of code is causing the error. I may be able to guess what the problem is just by looking at the line of code that's causing the error.

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.

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.

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?

The "Tree" class is built into Unity, it's not part of my package. The missing "data" definition ought to be there, and if it isn't, then Unity may have removed it from that particular version of Unity. Please note that I have not updated LushLOD Trees to the latest beta version of Unity. Once Unity 2018 is out of beta, I will update LushLOD to the 2018 version.


My trees do not use the "data" component of the "Tree" class for anything whatsoever, so you could try to simply comment out (or otherwise bypass) any lines that are trying to use the "data" definition of the "Tree" class. If my memory is correct, my trees don't use that "data" component for anything whatsoever, I think I put it in for potential future use or something like that, so if you are code savvy you may be able to comment out or otherwise bypass the parts of the lines of code that are messing with "data". 


Again, I'll have this fixed once I update to Unity 2018 which will be as soon as it's out of beta. 


If you're getting stuck on any particular line of code that you can't figure out how to comment out or bypass the "data" component, please let me know what line of code it is and I'll tell you how to fix it. Sorry about this problem.

This is probably happening because you baked the trees into groups. If you want to do a combined mesh like this, you won't be able to use most of the LushLOD transition features. For example, there's absolutely no way the trees will be able to transition from high quality tree models, into billboard models. But if you are planning to use only the billboard models, then this might work... maybe....


But you're using the wrong billboard shader. You should be using the "billboard only" mode. Prior to converting the trees into this combined mesh, you should have set it to billboard only mode in the manager. But since you already converted them into a combined mesh, then I guess you can manually set them to use the billboard only shader..


Next, you have to understand that using a combined mesh like this means you basically can't use LushLOD manager, and the transitions won't work, and you'll need to also remove the LushLODTree.cs script from the trees... which means no transitions will work at all. You'll have to use billboard only mode... no transitions between high quality and billboard meshes will be possible with these combined meshes.


Also, I think yiou'll need to use one of the lower quality billboard shaders. You're using tree_leaves2 shader, which is one of the transitioning shaders. That won't work. It needs to be billboards only, if you want to combine the meshes like this, and needs to be one of the lower quality shaders such as leaves_far3 or leaves4_far (leaves 4 is the lowest quality). You'll basically have to delete the manager, and delete the LushLODTrees.cs script from all the trees, and delete the high quality tree meshes entirely, and leaving only the billboard meshes in the scene, and then attach something like the leaves_far4 shader to them, and then you'll have to write a script to set the main directional light in the tree's materials. Basically, if you look at the Update() function on the LushODTreeManager.cs, you'll see that it sets some global shader values relating to the main directional light, such as the color and intensity and direction of the light. Without those shader values being set, the trees will be completely black. If you remove the manager from your scene, then you'll need to write a script and copy ot all the stuff that the manager does in it's Update() function, relating to setting those global shader values, and put that into your scripts Update() function to ensure that your tree's have those necessary values for the main directional light, or else they will keep turning black.


Basically, the trees are not designed to be combined like what you are doing here. I guess you are combining them because you want a flight sim to have an extremely large number of trees, so you want to combine them for speed reasons. But unfortunately the trees do complicated transitions that just don't support this kind of combining of the meshes. If you want to combine the meshes like this, you'll have to follow the above steps to reduce the trees down to billboards only, and remove all the scripts, and even then I'm not 100% sure if it will work.The reason the trees keep turning black is probably because of the scripts... those scripts (the LushLODTreesManager.cs and the LushLODTree.cs) are messing with the tree's materials and material settings, but your meshes were combined and the scripts don't expect that.

I see the line of code that's causing that error to appear. It's in _LushLODTreesManager.cs. If you just search for that text in that error, you'll find the line. It looks for Camera.main to exist.


Main camera documentation: https://docs.unity3d.com/ScriptReference/Camera-main.html


Here's another link about how to set a camera to be the main camera: https://answers.unity.com/questions/63221/how-to-set-main-camera.html


I'm pretty sure the trees won't work correctly if the main camera isn't set up properly... like... the transitions are centered around the main camera. So it's important to set the camera up with that tag to ensure that the transitions follow the camera correctly.

It could be an issue with the lastest beta... my last update was for Unity 2017. I've got an update in the works for when 2018 comes out of beta but in the mean time, can you copy / paste the entire error message, or screenshot it for me, and post it here?

When I made the Gaia demo scene about a year ago, I had to add the trees to Gaia as if they were "rocks" being added to the scene, and not as actual trees. Adding them as non-tree objects worked for me but that was a year ago, and I haven't tested it since. Gaia wouldn't add them as trees because it complained that they weren't actually unity trees, which is true.

It does look like they updated the wind zones. My branches used to slide around horizontally a bit, but if they aren't moving at all anymore, then that's probably what happened, they made a breaking change to the wind zones.


I will add this to the to-do list to get this fixed. In the mean time, if the leaves are still moving in the wind, you might just have to turn down the wind quite a bit so that it's less noticeable that the branches aren't moving.


As for the flickering happening with the trees that came with the asset, that's not what I expected to hear. My trees should all have single-sided polygons. I'm pretty sure the issue has something to do with the way Unity 2017 is handling the thing called "ambient occlusion" in the leaves....


Anyway I will take a look at both these issues soon and try to get a fix for you soon.