Skip to main content

Install the UWebView2

Import and create a simple canvas from scratch.

Getting Started

  1. Import Unity Package.

Import Unity Package

  1. Check the system's built-in runtime version.

Import Unity Package Import Unity Package

Create a new UGUI EdgeCanvas

Right-click in the Unity Hierarchy window to pop up the creation menu.

Import Unity Package

You can modify this Source property, which will load the specified URL after the canvas initializes.

Import Unity Package

Import Unity Package

tip

If you don't want to use the Source property, you can also use code to initialize and load in the Awake method

public class test : MonoBehaviour
{
public EdgeCanvas m_edgeCanvas;

// Method A
private void Awake()
{
m_edgeCanvas.WaitInitialize(edge =>
{
edge.LoadUrl("https://bing.com")
});
}

// Or
// Method B
private async void Awake()
{
await m_edgeCanvas.WaitInitialize();
m_edgeCanvas.LoadUrl("https://bing.com");
}
}

Play

Once it starts running, you will see the following screen:

runtime