PoggyBird/Assets/Web3Unity/Scripts/Prefabs/WebGL/WebGLSignMessageExample.cs
2023-02-28 19:02:09 +05:30

23 lines
469 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_WEBGL
public class WebGLSignMessageExample : MonoBehaviour
{
async public void OnSignMessage()
{
try
{
string message = "hello";
string response = await Web3GL.Sign(message);
print(response);
}
catch (Exception e)
{
Debug.LogException(e, this);
}
}
}
#endif