Class CommonBrowserInterop
Interoperability methods for WebGL browser functionality.
Inherited Members
Namespace: Unity.Cloud.Common.Runtime
Assembly: Unity.Cloud.Common.Runtime.dll
Syntax
public static class CommonBrowserInterop
Methods
CacheValue(string, string)
Store the value in the browser cache.
Declaration
public static void CacheValue(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key. |
| string | value | The value. |
ClearCache(string)
Clear the value from the browser cache.
Declaration
public static void ClearCache(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key to clear. |
CopyToClipboard(string)
Copy a string value to the clipboard.
Declaration
public static bool CopyToClipboard(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The value to copy. |
Returns
| Type | Description |
|---|---|
| bool | Whether the copy was successful. |
GetQueryParam(string)
Get the query parameter by id.
Declaration
public static string GetQueryParam(string paramId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | paramId | The query parameter id. |
Returns
| Type | Description |
|---|---|
| string | The query parameter. |
GetURLFromPage()
Get the URL from the page.
Declaration
public static string GetURLFromPage()
Returns
| Type | Description |
|---|---|
| string | The URL. |
Navigate(string, string)
Navigate to a specific URL.
Declaration
public static void Navigate(string url, string windowId = "_self")
Parameters
| Type | Name | Description |
|---|---|---|
| string | url | The URL. |
| string | windowId | The window id. |
RetrieveCachedValue(string)
Retrieve a value from the browser cache.
Declaration
public static string RetrieveCachedValue(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key for the value to retrieve. |
Returns
| Type | Description |
|---|---|
| string | The value to retrieve. |
SaveAuthorizationCookie(string)
Stores the authorization cookie in the browser.
Declaration
public static void SaveAuthorizationCookie(string token)
Parameters
| Type | Name | Description |
|---|---|---|
| string | token | The authorization cookie. |