- Home /
RenderPipelineManager.endCameraRendering only affects ViewPort-camera
I subscribed to this event in order to render healthbars onto multiple cameras in the game, however the LookAt function only affects the Viewport camera in the scene-window. Even if I close the scene-view, it doesn't work. Shouldn't it affect the cameras in the scene?
void RenderPipelineManager_endCameraRendering(ScriptableRenderContext context, Camera camera)
{
foreach (var healthBar in healthBars)
{
healthBar .transform.LookAt(camera.transform);
}
}
Answer by Filip8429 · Dec 27, 2021 at 11:26 PM
Okay, nevermind I fixed the problem. For anyone reading this in the future: I just had to build the game. Turns out that for some reason this didn't work while in the editor.
Your answer
Follow this Question
Related Questions
Rendering when 'moving a character controller through a "portal"' 2 Answers
Camera follow a sphere which look at another object on the ground 0 Answers
Different camera aspect ratios/resolutions? 1 Answer
How to make slight Camera move and smooth 0 Answers
materials visible if seen by (1) all or (2) any camera(s) 0 Answers