Alternatives to using Camera.main?

I have several cameras in my scene and several scripts that are performing raycasts .etc from Camera.main, obviously when I want to switch to a different camera this is going to cause issues. Is there an alternative to Camera.main that holds the currently rendering camera .etc?

Camera.main is just a shortcut to whatever camera happens to be tagged “MainCamera” (or the first one it finds, if there’s more than one). Feel free to use whatever system you want instead, by using tags, storing references, etc.