WebBrowserClient Class
Definition
The main object responsible for UWB.
This class handles:
[System.Serializable]
public class WebBrowserClient : IDisposable
- Inheritance
- System.ObjectWebBrowserClient
- Attributes
- System.SerializableAttribute
- Implements
- System.IDisposable
Fields
backgroundColor | The background UnityEngine.Color32 of the webpage |
cache | Enable or disable the cache |
communicationLayer | The CommunicationLayer to use |
engine | The active browser engine this instance is using |
engineStartupTimeout | Timeout time for waiting for the engine to start (in milliseconds) |
initialUrl | The initial URl the browser will start at |
javascript | Enable or disable JavaScript |
localStorage | Enable or disable local storage |
logSeverity | The log severity. Only messages of this severity level or higher will be logged |
popupAction | How to handle popups |
processLogHandler | |
proxySettings | Proxy Settings |
remoteDebugging | Enable or disable remote debugging |
remoteDebuggingPort | The port to use for remote debugging |
webRtc | Enable or disable WebRTC |
Properties
BrowserTexture | Texture that the browser will paint to |
CachePath | The path to the cache |
FPS | Internal FPS of pixels communication between Unity and the Engine |
HasDisposed | Has this object been disposed |
IsConnected | Are we connected to the UW engine process |
Logger | Gets the IWebBrowserLogger to use for logging |
LogPath | The path that UWB engine will log to |
ReadySignalReceived | The UWB engine has signaled that it is ready |
Resolution | The resolution of the browser. There is a chance that resizing the screen causes UWB to crash Unity, use carefully! Resizing in performance mode is not supported! |
Methods
Dispose() | Destroys this WebBrowserClient instance |
ExecuteJs(String) | Executes JS in the browser |
Finalize() | |
GetScrollPosition() | Gets the mouse scroll position THIS IS INVOKED ON THE THREAD THAT IS CALLING THIS AND IS BLOCKING |
GoBack() | Tells the browser to go back |
GoForward() | Tells the browser to go forward |
LoadHtml(String) | Makes the browser load html |
LoadTextureData() | Loads the pixel data into the BrowserTexture |
LoadUrl(String) | Tells the browser to load a URL |
Refresh() | Refreshes the browser |
Resize(Resolution) | Resizes the screen. |
SendKeyboardControls(WindowsKey[], WindowsKey[], Char[]) | Sends a keyboard event |
SendMouseClick(Vector2, Int32, MouseClickType, MouseEventType) | Sends a mouse click event |
SendMouseMove(Vector2) | Sends a mouse event |
SendMouseScroll(Vector2, Int32) | Sends a mouse scroll event |
UpdateFps() | Updates FPS values Normal usage shouldn't require invoking this |
Events
OnFullscreen | Invoked when the browser goes in or out of fullscreen |
OnInputFocus | |
OnLoadFinish | Invoked when the page finishes loading |
OnLoadProgressChange | Invoked when the loading progress changes Progress goes from 0 to 1 |
OnLoadStart | Invoked when the page starts to load |
OnPopup | Invoked when the browser gets a popup |
OnTitleChange | Invoked when the title changes |
OnUrlChanged | Invoked when the url changes |