Hello friends,
It could probably be said that this might be better off in the forums, and I’m not opposed to that. Perusing them, however, I couldn’t exactly figure out WHERE to put this topic, so I thought I’d post it in answers. Hope I’m not clogging up the place with it.
So, this has to do with performance. I noticed after adding different models, textures, etc. that my framerate went way down, while my drawcalls and tris went skyrocketing. Ok, no problem. A little google search taught me about the “Combine Children” script. Always wondered what that was. Used it, and life seemed good.
For a moment.
Performance improved dramatically, but then I noticed that many of my combined meshes just plain weren’t showing up anymore. I’ve read up on this, I see it’s an issue that’s been addressed, and while I haven’t found a unified single answer, I know that the topic’s been covered enough to not warrant one more noob asking about it.
So believe it or not, I’m not asking how to fix it. Not right now. Instead, I’m going to ask for opinions on a workaround that I’ve thought up. It’s dawned on me that I might be drawing things unnecessarily in my game. For instance: let’s say the town of bogville is 20 miles away from the spooky forest. Yet the spooky forest is still active on my map when I walk into the town of bogville. Would I save drawcalls, save on performance if I just put an invisible box collider nearer to the spooky forest which would activate / deactive it when the player is close? I suppose I could do this with any models that were collected in a gameobject throughout the game, my question is just would this be a way (good, bad, or ugly is irrelevant right now, I just am thinking proof of concept) of improving performance? Thanks, and God bless.
Make changes, observe draw calls. See what gives the most bang for the buck. Try disabling all scripts in one copy of the level and see if that improves drawcalls (you may be messing with materials or changing transforms)
– StatementI appreciate that Statement, thanks. Am playing around with enabling / disabling gameobjects automatically now, and it seems to be giving me several fps performance boost. EDIT - Additionally, I owe you one. I had no idea about what the rendering path was on my camera. Changing to forward gave me a three fold increase in rendering performance with a very acceptable downgrade in visual performance. Thanks!
– Conect11There's a lot of options in [quality settings][1] too. Like you may be able to reduce shadow distance if you use shadows or lightmaps (dual lightmaps use the shadow distance to blend between realtime lighting and baked lighting for instance) [1]: http://docs.unity3d.com/Documentation/Components/class-QualitySettings.html
– StatementStatement, your advice has been incredibly valuable in increasing the performance output of my game :)
– Conect11