camera.layerCullDistances question

Is it possible to use “camera.layerCullDistances” with different layers with the same camera in the same scene?
I have tried it based in the Unity docs:

	function Start () {
		var distances = new float[32];
                distances[10] = 15;
		camera.layerCullDistances = distances;
               	var moredistances = new float[32];
                moredistances[12] = 100;
		camera.layerCullDistances = moredistances;
	}

But, in this example, the camera only culls the last layer (layer number 12 defined in moredistances)

Any idea?

Any suggestion?

Man I’m also confused about the
camera.layerCullDistances
What does “distances[10] = 15;” even mean?

distances[10] = 15
It means you set the distance for the objects in the layer number 10 to be “seen” by the camera at the distance of 15 units.

The following should work:

    function Start () {
        var distances = new float[32];
                distances[10] = 15;
                distances[12] = 100;
        camera.layerCullDistances = distances;
    }