From what I gathered with some help,
The issue was that adding the SWebBrowser.h
file like I did doesnt work, I needed to add it to the public dependencies in the .build file of my module.
Even after that it still has issues with Intellisense not recognizing it so: SNew(SWebBrowser)
will still show an error, but will compile and work as it does in the SlateViewer example.
Although I noticed that it will crash at compile time when instead of SNew I do:
In .h file:
#include "SWebBrowser.h"
...
SWebBrowser MyWebBrowser;
In .cpp file:
#include "MyHeader.h"
...
SAssignNew(MyWebBrowser, SWebBrowser)
For some reason it will not be able to compile this telling me these errors (also when forward declared) :
- “SWebBrowser” is undefined
Edit* I forgot and simply declared it wrong, it should be:
TSharedPtr<SWebBrowser> MyBrowser;