you can put an object on a layer then use a second camera on it (culling the rest of the scene). set your main camera’s depth to a lower value than the second one and set it to cull the object’s layer.
Yeah you can change rendering order in there but be careful, because messing with shader order when is not supposed to can be problematic in the future of your project.
Will that script allow me to change the order that game objects are rendered in? For example, if I want objects to render in order of distance from my player object, would I use this script.
What I want is for a player to be able to hide his vehicle in a clump of trees and not be seen by other players outside the rendering distance of the trees.
On his end, he thinks he is hidden but on another players FE, he is in open terrain as the rendering of the player took precedence over the trees.
I didnt say that it was bad or wrong, its just that can get problematic if you dont consider a system of administrating those queues, because you are queuing and object in the material queue, not a material itself.
It was just my point of view, nothing bad with your solution.