Load HTML String
For a simple UI, you can directly load an HTML string, for example, an interface generated by AI.
public class TestScript : MonoBehaviour
{
public EdgeCanvas m_edgeCanvas;
private async void Awake()
{
m_edgeCanvas.WaitInitialize((canvas) =>
{
canvas.LoadHtmlContent(@"<h1 style=""color:red"">Hello UWebView2</h1>")
});
}
}npm