You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
688 B

2 years ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WebConnectSample : MonoBehaviour
{
public Text recTxt;
private void Awake()
{
//注册接收方法
EduCoderTool.WebConnecter.Singleton.dataHandle += ReceiveWebMsg;
}
//接收从平台发送过来的数据
void ReceiveWebMsg(string data)
{
Debug.Log("ReceiveWebMsg:" + data);
recTxt.text = data;
}
//提交成绩一共有3个方法这里展示了常用的提交分数的方法
public void ButtonClick()
{
EduCoderTool.WebConnecter.Singleton.SendResultToWeb(true, 90);
}
}