Interface for an object that creates a special texture that the webview can use for rendering. Note that the WebViewPrefab
takes care of using this interface for you, so you only need to deal with it directly if you create IWebView
instances outside of a prefab using WebViewFactory.GetInstance()
.
void CreateTexture(float width, float height, Action<Texture2D> callback)
Creates a special texture that the webview can use for rendering, using the given dimensions in Unity units. Texture creation occurs asynchronously in order to allow textures to be created on the render thread, and the provided callback is called once the texture has been created.