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!
Hitting the "Render Target" button programmatically
Moderator: ChrisHekman
- ChrisHekman
- Posts: 1061
- Joined: Wed Jan 18, 2017 3:09 pm
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:
This should activate rendering
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;