Hello, so I’ve been busily developing a 3D game with a top down one-direction camera for iOS and its been performing wonderfully on my iphone 4. However upon testing the game in a much larger scene with a lot more scenery objects the game lags itself into oblivion. (Phone-side only lag, no such issues when running on the mac)
These additional scenery objects are not within the camera’s clipping planes range and should presumably not be being rendered. Furthermore these objects are mostly just basic primitives (Cubes and such), with some of them being textured planes instead. They have no scripts, do not get initiated or destroyed and shouldn’t be being referenced by any other scripts.
I had assumed, perhaps foolishly, that because of Unity’s Frustum Culling the performance impact of a large level populated with nothing but static scenery (both in the sense that the objects just sit there, and the sense that I’ve tried toggling static on them) would be minimal. However as the game performs fine when I make two-thirds of the level’s scenery inactive, I’m guessing I was wrong.
(Just to clarify the lag is stopped by making objects outside of the camera’s clipping range inactive, the same amount of triangles are visible on the screen as were prior to the lag)
Obviously I’m no expert and a little confused to why this is happening, so I’d just like to make sure that I’m barking up the right tree here, and that large amounts of scenery not currently being rendered does in fact put a lot of processing strain on the platform. Just to make sure there isn’t some kind of hidden other system in my game responsible for this lag.
Assuming it is simply the sheer number of objects in the level causing my issue, any suggestions on how I could work around this would be welcome, other then just reducing the size of the level ^^. For example I’m toying with the idea of making the level’s scenery activate and deactivate as the player moves round it, since the level seems to work fine with most of the off screen scenery inactive.
Apologies for the wall of text, just trying to make my situation as clear as possible, thanks in advance for any and all responses.