If every mesh imported is calculated as no less than 1000 polys, is a unity cube calculated as such? Are the unity primitives any cheaper to use?
I’ve figured out how to delay the rendering of an object and delay whether its active in the scene. I have Two such entities, animated characters, as well as one active.
Is having things inactive and unrendered whats slowing my framerate?
Are you guys using terrain meshes around the 1000-4000 amount, or closer to the 65000 limit?
Is having multiple cameras likely to cause much loss of frame rate?
There’s an initial cost in rendering any new object, no matter what it is.
Objects which are deactivated, which have their renderer disabled or which are being culled because they’re well outside of the camera frustum, do not cost anything in terms of rendering time. However, their scripts may be causing some degree of slowdown, depending on what they’re doing.
I’m not doing anything with terrain meshes, but I’d expect that you can have a reasonably high polycount for the terrain. Beyond a certain point, the biggest cost comes from having huge mesh colliders rather than having a single large, complex mesh. You may want to break a larger terrain into largish blocks to allow Unity to cull chunks of terrain which are outside of the camera’s frustum.
Depends. The cost of having extra cameras is negligible (especially if they don’t clear either or both of the colour and depth buffers), but you still have to pay for every separate object they render. If you have two cameras and they’re both viewing the same scene, it’ll probably take twice as long for them both to render everything.
It’s not like rendering a 1000 poly object is any faster than rendering a 10 poly object. Rendering a 10 poly object will always be (slightly) faster; just the difference is not that large.
So if a cube only has 24 triangles, there’s no point in adding more.
What the docs on performance optimization mean: reduce the number of objects. If you can, combine objects together until they are several thousand triangles. After that, you can still combine them, but then other factors come into play (e.g. each pixel light or projector will have to redraw the whole big object).
If you are just adding more polies to your existing objects; without reducing object count - it’s not going to be faster.
Very good…
Thanks for that info. Having all my posts via “ego search” is becoming a good reference doc…
Hey so I thought I had activating GO’s sussed, but on closer examination, They compile okay but dont work. This could go on a new thread in the scripting forum but since I’ve already boasted that I can do it on this thread, I’ll eat my own word here too
The should almost never be a reasion to use the line “Start();”. The Start function is called automatically when the script starts running.
I think instead of GameObject(), you mean gameObject. gameObject refers to the game object the script is attached to. GameObject() (I think) would create a new, empty game object and not really do anything with it.