Bug / Crash Actors do not render when manually rendering camera - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: General (https://obi.virtualmethodstudio.com/forum/forum-5.html) +--- Thread: Bug / Crash Actors do not render when manually rendering camera (/thread-4358.html) |
Actors do not render when manually rendering camera - nickhudson4 - 09-09-2024 Actors do not render when manually using Camera.Render() and rendering to a texture. Steps to reproduce: 1. Create actor in scene and place camera. 2. Add RawImage to scene to show camera output 3. Disable camera component. 4. Create script Code: public class ObiTester : MonoBehaviour RE: Actors do not render when manually rendering camera - josemendez - 09-09-2024 Hi, This is regular Unity behavior: Camera.Render() renders the camera immediately, so any draw calls that haven't been enqueued before the call to Camera.Render() will have no effect. If you want to manually render a camera, make sure to do so after all scripts have had a chance to issue graphics commands for the current frame. Obi enqueues its drawcalls during the solver's LateUpdate(), in order to minimize the amount of time the main thread spends waiting for worker threads. Attempting to render a camera during Update() before solvers have had time to request any drawing will result in them not being rendered. Instead call Camera.Render() during LateUpdate(), from a script that is set to execute after ObiSolver. kind regards, RE: Actors do not render when manually rendering camera - nickhudson4 - 11-09-2024 (09-09-2024, 10:31 PM)josemendez Wrote: Hi, This fixes it. Thanks! |