Page 1 of 1
Hitting the "Render Target" button programmatically
Posted: Fri Jan 22, 2021 11:57 pm
by Facebook-AY
Trying to automate a few things, and realized that I'm not sure how I can hit a render target component's "Render" button or open the Octane window with "View Source"
Is this possible? Is there an API anywhere that I can gleam?
Any direction would be helpful. Thank you!
Re: Hitting the "Render Target" button programmatically
Posted: Mon Feb 15, 2021 1:42 pm
by ChrisHekman
There is no explicit API you can see no. However you should be able to do this programmatically.
PBRRenderTargetComponent should be publically excessable.
PBRRenderTargetComponent has a member called RenderTarget
Then in the scene you can set the active rendertarget thusly:
Dirty example:
Code: Select all
OctaneUnity.PBRRenderTargetComponent comp = GetCompoment<OctaneUnity.PBRRenderTargetComponent>();
OctaneUnity.Scene.Instance.RenderTarget = comp.RenderTarget;
This should activate rendering