Apply Camera.layerCullDistances to certain/specific layers?

I’m trying to use Camera.layerCullDistances, having referenced the docs here: Unity - Scripting API: Camera.layerCullDistances

I’ve searched for other people’s implementation of this, but I am getting the idea that Camera.layerCullDistances only applies to the overall far clip distance, (in a manner of speaking) and cannot be specifically applied to specific layers.
What I’d like to do is set the Camera.layerCullDistances variable to be different for different layers, but I don’t see any documentation on how to specify this value for a certain layer here. What am I missing here? Thanks for your thoughts.

I would also like to point out to anyone perusing the example code in the Unity docs, that you define distances[10] = 15; where [10] corresponds to your “layer” in Unity, and 15 is the distance you wish to use.
What’s not readily obvious, is that for another layer, you simply write the same thing (again on a new line), with your modifications, such as: distances[8] = 22;
for the other layers you’re using.

Then you finish with : camera.layerCullDistances = distances; which uses the values you wrote for each layer (using some or all of the possible 32 values this float can store), which is stored within the “distances” float variable, as the Camera’s layerculling distances.

Hope this helps someone else make sense of this as well.

layerCullDistances is an array of floats. You need to create a float[32], and then you can set the far clip plane for each layer in it’s respective spot in the array. A default value of zero will use the normal far clip plane.