Best way to have a camera only see certain objects?

Layers aren’t exactly what I’m looking for in this scenario. Basically, I want two (or more) cameras to be able to move across a timeline and render objects if and only if they exist at that point in the timeline. Time travel shenanigans.

Example Timeline:

<–WWWWW-------OOOOO-------------->

As the camera moves back and forth across the timeline (via player input) it would only see the Ws when at a point when they exist. Same for the Os. Naturally, there would be more than two objects and overlaps will certainly occur.

Is there a way to, on the camera, grab a variable from the objects and only render it if that variable matches? The only solution I found was to iterate through every object and enable/disable the rendering of it depending on where the camera is and that feels really clunky when done for multiple cameras in succession.

As Chuckleluck wrote, you can use OnPreRender and OnPostRender. In this example, the layer of an object is switched so it isn’t rendered by this particular camera.

using UnityEngine;
using System.Collections;

public class SwitchLayer : MonoBehaviour {

	public GameObject go;
    public string layerName_0 = "MyLayer0";//the layer that is not rendered by this camera
    public string layerName_0 = "MyLayer1";//The object's normal layer

	void OnPreRender() {
		if(go== null) {
			return;
		}

		go.layer = LayerMask.NameToLayer("MyLayer0");
	}

	void OnPostCull() {
		if(go== null) {
			return;
		}
		
		go.layer = LayerMask.NameToLayer("MyLayer1");
	}
}