Hitting the "Render Target" button programmatically

A public forum for discussing and asking questions about the Octane for Unity Alpha

Moderator: ChrisHekman

Post Reply
Facebook-AY
Licensed Customer
Posts: 2
Joined: Sun Dec 02, 2018 3:44 pm

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!
ChrisHekman
OctaneRender Team
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:

Code: Select all

OctaneUnity.PBRRenderTargetComponent comp = GetCompoment<OctaneUnity.PBRRenderTargetComponent>();
OctaneUnity.Scene.Instance.RenderTarget = comp.RenderTarget;
This should activate rendering
Post Reply

Return to “Octane for Unity”