Is it possible to bind uobject of a slate webbrowser in C++ to a js class instance in unrealjs?
tiagorvmartins opened this issue · comments
Hello there, I have been trying to come to workaround for some hours, but still didn't manage to achieve, would appreciate some help here.
Basically I am creating a SWebBrowser (Slate Web Browser) using C++ and I would like to bind UObject that would run in Unrealjs context.
At the moment I am able to execute C++ code from the SWebBrowser using the UObject (c++) that I binded.
MyBrowserBridge = NewObject<UMyBrowserBridge>(BrowserBridgeClass); // this is basically my custom UObject
TSharedRef<SWebBrowser> myBrowser = SNew(SWebBrowser)
.InitialURL("the_url")
.ShowControls(false);
myBrowser->BindUObject("MyBrowserBridge", MyBrowserBridge, true); // now this the thing, I would like MyBrowserBridge to be a js class, how can I reference (using the BindUObject API of SWebBrowser) a function to be executed in the unrealjs context?
If I need to change approach or if its not possible let me know please,
Thank you in advance!
Nevermind got it fixed, just used a blueprint and extended in unrealjs and binded uobject to the created unrealjs class.