IWithPixelDensity

interface

Namespace: Vuplex.WebView

Implemented by: ?

An interface implemented by a webview if it supports changing its pixel density, which is its number of physical pixels per logical pixel. The default pixel density is 1, but increasing it to 2 can make web content appear sharper or less blurry on high DPI displays.

Example

await webViewPrefab.WaitUntilInitialized();
var webViewWithPixelDensity = webViewPrefab.WebView as IWithPixelDensity;
if (webViewWithPixelDensity == null) {
    Debug.Log("This 3D WebView plugin doesn't yet support IWithPixelDensity: " + webViewPrefab.WebView.PluginType);
} else {
    webViewWithPixelDensity.SetPixelDensity(2);
}

Summary

Public properties

Public properties

PixelDensity

float PixelDensity { get; }

Gets the current pixel density.

Public methods

SetPixelDensity

void SetPixelDensity(float pixelDensity)

Sets the pixel density. The value must be between 0 and 10, and the default is 1.