Just have a question, searched and couldn’t find an answer (Or maybe I don’t know how to search for this)
Is there an option to configure the drawing distance of an object? Specially if possible in code!
something like this:
gameObject.drawDistance = 200;
Then whenever the object is more than 200 units far away from the camera, the camera won’t draw it, I want this to make my small/unimportant props not to be drawn from far away, but large and visible stuff will always be visible.
If you are working with Unity Free and can’t get access to the LOD builtin feature you can give a try to the Camera.layerCullDistances property. Basically it is an array of floats (one per each layer of your escene) than lets you set the distance from which all the objects of the layer won’t be drawn. With this you can make for example that the small or more complex vegetation only gets drawn when the camera/player is close enough to appreciate it.
I use this method in my projects, it may cause popping sometimes but it’s pretty easy and fast to implement and works fine when targeting to low performance mobile devices
It configures an Objects visibility based on distance to the camera. You can set up different meshes with different details based on distance and the last step is defining when it will no longer be drawn at all. It is a Pro feature though, so without Pro you would need to write a sort of Distance script which check the distance to the camera manually and then turns the renderer on or off.