StandaloneWebView

class : MonoBehaviour, IWebView

The base class for the Windows and macOS IWebView implementations, which also includes extra methods for Standalone-specific functionality.

Summary

Public methods

EnableRemoteDebugging

static void EnableRemoteDebugging(int portNumber)

Enables remote debugging with Chrome DevTools on the given port. For example, if you provide 8080 as the portNumber, you can go to localhost:8080 in Chrome to see a list of webviews to inspect.

MovePointer

void MovePointer(Vector2 point)

Moves the pointer to the given point in the webpage. This can be used, for example, to trigger hover effects in the webpage.

The x and y components of the point param are values between 0 and 1 that are normalized to the width and height, respectively. For example, point.x = x in Unity units / width in Unity units. Like in the browser, the origin is in the upper-left corner, the positive direction of the y-axis is down, and the positive direction of the x-axis is right.

PointerDown

void PointerDown(Vector2 point)

Dispatches a mouse down click event. This can be used, for example, to implement drag-and-drop.

The x and y components of the point param are values between 0 and 1 that are normalized to the width and height, respectively. For example, point.x = x in Unity units / width in Unity units. Like in the browser, the origin is in the upper-left corner, the positive direction of the y-axis is down, and the positive direction of the x-axis is right.

PointerUp

void PointerUp(Vector2 point)

Dispatches a mouse up click event. This can be used, for example, to implement drag-and-drop.

The x and y components of the point param are values between 0 and 1 that are normalized to the width and height, respectively. For example, point.x = x in Unity units / width in Unity units. Like in the browser, the origin is in the upper-left corner, the positive direction of the y-axis is down, and the positive direction of the x-axis is right.