Hello, I am wanting to take advantage of the delegate “FOnShowDialog OnShowDialog” Defined in SWebBrowser.h, however, I am confused as to how I actually bind a delegate that I did not define myself. Do I need to define the delegate myself even though it’s already defined in the header of another class? Any help here would be greatly appreciated.
Current Header for binding:
public:
/** Broadcasts whenever an alert appears */
DECLARE_EVENT( SWebBrowser, FOnShowDialog )
SWebBrowser::FOnShowDialog& OnBrowserDialog() { UE_LOG(LogTemp, Log, TEXT("LOADED EVENT")); return OnShowDialog; }
private:
/** Broadcasts whenever the layer changes */
SWebBrowser::FOnShowDialog OnShowDialog;
public:
/**Calls the event */
void invokeEvent();
Current C++ body for binding
void UMYWebBrowser::invokeEvent()
{
UMYWebBrowser* SMaker = this;
SWebBrowser::FOnShowDialog& SEvent = SMaker->OnBrowserDialog();
UE_LOG(LogTemp, Warning, TEXT("LoadingInvoker"));
}