29 lines
640 B
C#
29 lines
640 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class Test : MonoBehaviour
|
|
{
|
|
public TMP_Text text;
|
|
public Canvas canvas;
|
|
|
|
ApiResponse apiResponse;
|
|
|
|
private void Start()
|
|
{
|
|
NetworkManager.Instance.CreateRequest<ApiResponse>("api/test",new object(),(data) => {
|
|
apiResponse = data;
|
|
});
|
|
}
|
|
void Update()
|
|
{
|
|
text.text = $"x : {canvas.transform.position.x}, y : {canvas.transform.position.y}\nip : {(apiResponse == null ? "null": apiResponse.test)}";
|
|
}
|
|
public class ApiResponse
|
|
{
|
|
public string test;
|
|
}
|
|
|
|
}
|