Class WebBrowserUtils
Provides Utils to be used by the web browser
Inherited Members
Namespace: VoltstroStudios.UnityWebBrowser.Helper
Assembly: .dll
Syntax
public static class WebBrowserUtils
Methods
| Edit this page View SourceGetAdditionFilesDirectory()
Gets the main directory where logs and cache may be stored
Declaration
public static string GetAdditionFilesDirectory()
Returns
Type | Description |
---|---|
string |
GetBrowserEnginePath(Engine)
Gets the folder that the UWB process application lives in
Declaration
public static string GetBrowserEnginePath(Engine engine)
Parameters
Type | Name | Description |
---|---|---|
Engine | engine |
Returns
Type | Description |
---|---|
string |
GetBrowserEngineProcessPath(Engine)
Get a direct path to the UWB process application
Declaration
public static string GetBrowserEngineProcessPath(Engine engine)
Parameters
Type | Name | Description |
---|---|---|
Engine | engine |
Returns
Type | Description |
---|---|
string |
GetScreenPointToLocalPositionDeltaOnImage(Graphic, Vector2, out Vector2)
Gets the local position delta (0 -> 1) from a screen position on a Graphic from a top-left origin point
To calculate the pixel position, do Vector2.x * [Desired height] and Vector2.y * [Desired Width]
Declaration
public static bool GetScreenPointToLocalPositionDeltaOnImage(Graphic graphic, Vector2 screenPosition, out Vector2 position)
Parameters
Type | Name | Description |
---|---|---|
Graphic | graphic | Graphic that you want to calculate the local position on |
Vector2 | screenPosition | The screen position |
Vector2 | position | The local delta position |
Returns
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if the graphic is null |
IsRunningOnSupportedPlatform()
Checks if UWB is running on a supported platform
Declaration
public static bool IsRunningOnSupportedPlatform()
Returns
Type | Description |
---|---|
bool |