IWithNative2DMode

interface

Namespace: Vuplex.WebView

An interface implemented by a webview if it supports Native 2D Mode, which makes it so that 3D WebView positions a native 2D webview in front of the Unity game view instead of displaying web content as a texture in the Unity scene.

Summary

Public properties

Native2DModeEnabled

bool Native2DModeEnabled { get; }

Gets a value indicating whether the webview is running in Native 2D Mode.

Rect

Rect Rect { get; }

Gets the native 2D webview's rect on the screen, in pixels.

Visible

bool Visible { get; }

Gets a value indicating whether the native 2D webview is visible. The default is true.

Public methods

InitInNative2DMode

void InitInNative2DMode(Rect rect)

Initializes the webview in Native 2D Mode. This method is to be used instead of IWebView.Init() for initialization.

SetNativeZoomEnabled

void SetNativeZoomEnabled(bool enabled)

Sets whether the native 2D webview's pinch-to-zoom behavior is enabled. The default is true.

SetRect

void SetRect(Rect rect)

Sets the native 2D webview's rect on the screen, in pixels.

SetVisible

void SetVisible(bool visible)

Sets the native 2D webview's rect on the screen, in pixels.