WebViewPrefab

class : MonoBehaviour

Class for instantiating and controlling an instance of the WebViewPrefab prefab.

Example:

var webViewPrefab = WebViewPrefab.Instantiate(0.5f, 0.5f);
webViewPrefab.transform.parent = transform;
webViewPrefab.transform.localPosition = new Vector3(0, 0f, 0.5f);
webViewPrefab.transform.LookAt(transform);
webViewPrefab.WebView.LoadUrl("https://vuplex.com");

Summary

Public properties

Public properties

WebView

IWebView WebView

A reference to the prefab's IWebView instance.

Public methods

Init

void Init(float width, float height)

Initializes the WebViewPrefab instance. You only need to call this method directly if you place a WebViewPrefab prefab in your scene using the Unity Editor; it's not needed if you instantiate the prefab programmatically using Instantiate().

Instantiate

static WebViewPrefab Instantiate(float width, float height)

Creates a new instance of the WebViewPrefab prefab with the given dimensions in Unity units.

Resize

void Resize(float width, float height)

Resizes the prefab mesh and webview to the given dimensions in Unity units.

Public events

Clicked

EventHandler Clicked

Indicates that the prefab was clicked. Note that the prefab automatically calls the IWebView.Click() method for you.