The main object responsible for UWB.
This class handles:
- UWB process setup
- Texture setup and rendering
- Wrapper for invoking methods on the UWB process
- Shutdown
If you need to do something with UWB, its probably here.
Inheritance
WebBrowserClient
Assembly: .dll
Syntax
[Serializable]
public class WebBrowserClient : IDisposable
Fields
| Edit this page View Source backgroundColor
The background UnityEngine.Color32 of the webpage
Declaration
public Color32 backgroundColor
Field Value
| Edit this page View Source cache
Enable or disable the cache
Declaration
Field Value
| Edit this page View Source communicationLayer
Declaration
public CommunicationLayer communicationLayer
Field Value
| Edit this page View Source engine
The active browser engine this instance is using
Declaration
Field Value
| Edit this page View Source engineStartupTimeout
Timeout time for waiting for the engine to start (in milliseconds)
Declaration
public int engineStartupTimeout
Field Value
| Edit this page View Source initialUrl
The initial URl the browser will start at
Declaration
Field Value
| Edit this page View Source javascript
Enable or disable JavaScript
Declaration
Field Value
| Edit this page View Source jsMethodManager
Declaration
public JsMethodManager jsMethodManager
Field Value
| Edit this page View Source localStorage
Enable or disable local storage
Declaration
Field Value
| Edit this page View Source logSeverity
The log severity. Only messages of this severity level or higher will be logged
Declaration
public LogSeverity logSeverity
Field Value
Type | Description |
---|
LogSeverity | |
| Edit this page View Source Declaration
public PopupAction popupAction
Field Value
Type | Description |
---|
PopupAction | |
| Edit this page View Source processLogHandler
Declaration
public ProcessLogHandler processLogHandler
Field Value
| Edit this page View Source proxySettings
Declaration
public ProxySettings proxySettings
Field Value
Type | Description |
---|
ProxySettings | |
| Edit this page View Source remoteDebugging
Enable or disable remote debugging
Declaration
public bool remoteDebugging
Field Value
| Edit this page View Source remoteDebuggingPort
The port to use for remote debugging
Declaration
[Range]
public uint remoteDebuggingPort
Field Value
| Edit this page View Source webRtc
Declaration
Field Value
Properties
| Edit this page View Source BrowserTexture
Texture that the browser will paint to
Declaration
public Texture2D BrowserTexture { get; }
Property Value
| Edit this page View Source CachePath
Declaration
public FileInfo CachePath { get; set; }
Property Value
Exceptions
| Edit this page View Source FPS
Internal FPS of pixels communication between Unity and the Engine
Declaration
Property Value
| Edit this page View Source HasDisposed
Has this object been disposed
Declaration
public bool HasDisposed { get; }
Property Value
| Edit this page View Source HasInitialized
Declaration
public bool HasInitialized { get; }
Property Value
| Edit this page View Source IsConnected
Are we connected to the UW engine process
Declaration
public bool IsConnected { get; }
Property Value
| Edit this page View Source LogPath
The path that UWB engine will log to
Declaration
public FileInfo LogPath { get; set; }
Property Value
Exceptions
| Edit this page View Source Logger
Declaration
public IWebBrowserLogger Logger { get; set; }
Property Value
Exceptions
| Edit this page View Source ReadySignalReceived
The UWB engine has signaled that it is ready
Declaration
public bool ReadySignalReceived { get; }
Property Value
| Edit this page View Source 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!
Declaration
public Shared.Resolution Resolution { get; set; }
Property Value
Methods
| Edit this page View Source Dispose()
Declaration
| Edit this page View Source ExecuteJs(string)
Executes JS in the browser
Declaration
public void ExecuteJs(string js)
Parameters
| Edit this page View Source ~WebBrowserClient()
Declaration
protected ~WebBrowserClient()
| Edit this page View Source Gets the mouse scroll position
THIS IS INVOKED ON THE THREAD THAT IS CALLING THIS AND IS BLOCKING
Declaration
public Vector2 GetScrollPosition()
Returns
Type | Description |
---|
Vector2 | Returns the mouse scroll position as a Vector2 |
| Edit this page View Source GetZoomLevel()
Get's browser's zoom level
Declaration
public double GetZoomLevel()
Returns
| Edit this page View Source GoBack()
Tells the browser to go back
Declaration
| Edit this page View Source GoForward()
Tells the browser to go forward
Declaration
| Edit this page View Source LoadHtml(string)
Makes the browser load html
Declaration
public void LoadHtml(string html)
Parameters
| Edit this page View Source LoadTextureData()
Declaration
public void LoadTextureData()
| Edit this page View Source LoadUrl(string)
Tells the browser to load a URL
Declaration
public void LoadUrl(string url)
Parameters
| Edit this page View Source Declaration
public void OpenDevTools()
| Edit this page View Source Refresh()
Declaration
| Edit this page View Source RegisterJsMethod(string, Action)
Declaration
public void RegisterJsMethod(string name, Action method)
Parameters
Exceptions
| Edit this page View Source RegisterJsMethod<T>(string, Action<T>)
Declaration
public void RegisterJsMethod<T>(string name, Action<T> method)
Parameters
Type Parameters
Exceptions
| Edit this page View Source RegisterJsMethod<T1, T2>(string, Action<T1, T2>)
Declaration
public void RegisterJsMethod<T1, T2>(string name, Action<T1, T2> method)
Parameters
Type Parameters
Exceptions
| Edit this page View Source RegisterJsMethod<T1, T2, T3>(string, Action<T1, T2, T3>)
Declaration
public void RegisterJsMethod<T1, T2, T3>(string name, Action<T1, T2, T3> method)
Parameters
Type Parameters
Exceptions
| Edit this page View Source RegisterJsMethod<T1, T2, T3, T4>(string, Action<T1, T2, T3, T4>)
Declaration
public void RegisterJsMethod<T1, T2, T3, T4>(string name, Action<T1, T2, T3, T4> method)
Parameters
Type Parameters
Exceptions
| Edit this page View Source RegisterJsMethod<T1, T2, T3, T4, T5>(string, Action<T1, T2, T3, T4, T5>)
Declaration
public void RegisterJsMethod<T1, T2, T3, T4, T5>(string name, Action<T1, T2, T3, T4, T5> method)
Parameters
Type | Name | Description |
---|
string | name | |
Action<T1, T2, T3, T4, T5> | method | |
Type Parameters
Name | Description |
---|
T1 | |
T2 | |
T3 | |
T4 | |
T5 | |
Exceptions
| Edit this page View Source RegisterJsMethod<T1, T2, T3, T4, T5, T6>(string, Action<T1, T2, T3, T4, T5, T6>)
Declaration
public void RegisterJsMethod<T1, T2, T3, T4, T5, T6>(string name, Action<T1, T2, T3, T4, T5, T6> method)
Parameters
Type | Name | Description |
---|
string | name | |
Action<T1, T2, T3, T4, T5, T6> | method | |
Type Parameters
Name | Description |
---|
T1 | |
T2 | |
T3 | |
T4 | |
T5 | |
T6 | |
Exceptions
| Edit this page View Source Resize(Resolution)
Declaration
public void Resize(Shared.Resolution newResolution)
Parameters
Exceptions
| Edit this page View Source SendKeyboardControls(WindowsKey[], WindowsKey[], char[])
Declaration
public void SendKeyboardControls(WindowsKey[] keysDown, WindowsKey[] keysUp, char[] chars)
Parameters
Type | Name | Description |
---|
WindowsKey[] | keysDown | |
WindowsKey[] | keysUp | |
char[] | chars | |
| Edit this page View Source SendMouseClick(Vector2, int, MouseClickType, MouseEventType)
Sends a mouse click event
Declaration
public void SendMouseClick(Vector2 mousePos, int clickCount, MouseClickType clickType, MouseEventType eventType)
Parameters
Type | Name | Description |
---|
Vector2 | mousePos | |
int | clickCount | |
MouseClickType | clickType | |
MouseEventType | eventType | |
| Edit this page View Source SendMouseMove(Vector2)
Declaration
public void SendMouseMove(Vector2 mousePos)
Parameters
Type | Name | Description |
---|
Vector2 | mousePos | |
| Edit this page View Source Sends a mouse scroll event
Declaration
public void SendMouseScroll(Vector2 mousePos, int mouseScroll)
Parameters
Type | Name | Description |
---|
Vector2 | mousePos | |
int | mouseScroll | |
| Edit this page View Source SetZoomLevel(double)
Set browser's zoom level. Use 0.0 to reset.
Declaration
public void SetZoomLevel(double zoomLevel)
Parameters
Type | Name | Description |
---|
double | zoomLevel | |
| Edit this page View Source SetZoomLevelPercent(double)
Sets zoom level based off a percentage
Declaration
public void SetZoomLevelPercent(double percent)
Parameters
Type | Name | Description |
---|
double | percent | |
Exceptions
| Edit this page View Source UpdateFps()
Updates FPS values
Normal usage shouldn't require invoking this
Declaration
Events
| Edit this page View Source OnClientConnected
Declaration
public event OnClientConnected OnClientConnected
Event Type
| Edit this page View Source OnClientInitialized
Declaration
public event OnClientInitialized OnClientInitialized
Event Type
| Edit this page View Source OnFullscreen
Invoked when the browser goes in or out of fullscreen
Declaration
public event OnFullscreenChange OnFullscreen
Event Type
| Edit this page View Source Declaration
public event OnInputFocus OnInputFocus
Event Type
| Edit this page View Source OnLoadFinish
Invoked when the page finishes loading
Declaration
public event OnLoadFinishDelegate OnLoadFinish
Event Type
| Edit this page View Source OnLoadProgressChange
Invoked when the loading progress changes
Progress goes from 0 to 1
Declaration
public event OnLoadingProgressChange OnLoadProgressChange
Event Type
| Edit this page View Source OnLoadStart
Invoked when the page starts to load
Declaration
public event OnLoadStartDelegate OnLoadStart
Event Type
| Edit this page View Source Invoked when the browser gets a popup
Declaration
public event OnPopup OnPopup
Event Type
| Edit this page View Source OnTitleChange
Invoked when the title changes
Declaration
public event OnTitleChange OnTitleChange
Event Type
| Edit this page View Source OnUrlChanged
Invoked when the url changes
Declaration
public event OnUrlChangeDelegate OnUrlChanged
Event Type
Implements