Topic of the week
Optimization
"VR is highly dependent on draw calls. If you can get your head around that, then you're sweet. But everything comes down to knowing how to read the frame debugger, and stats panel when you run the game." Recent quote from Thomas Coromandal SAE Sydney
I know the structure of my code is to put it bluntly, crap. I'm keen to learn how to clean this up and I know from my Diploma that State Machines are the way to go. Along with optimizing Draw Calls, I'm going to focus on re-writing, and commenting all of my code this week.
Using the Unity profiler, I looked at the area I was having high draw calls, then turned off objects in that area to see where the issues were coming from. It was all coming from my underground mine track, which had hundreds of different meshes. The solution was to use a free Unity Asset called "Simplest Mesh Baker", and I combined similar objects into a single mesh. The disadvantage being baked lighting would no longer work as the light maps now have issued, I also can't move position of meshes once combined. My draw calls however have dropped from over 1000 to around 200-300. Most of the scene now runs very well with quest standalone, still some work to do but big progress!
Ancient Elementals, this one is Fernus the Ancient Fire Elemental
Just add some particle effects, a quick script and presto, can't wait for Halloween!
The final modifications for a while. I've suffered from a broken USB cable which is going to prevent me from doing dev work for a while. I'm not able to test what I'm doing when I make changes so it's kind of like flying blind. Looks to be all I'm going to be able to do this week, I still need to re-write the code but it's not a good idea to do that without being able to test as I go.