H_SafeExperienceDrivingSystem/U3D_DrivingSystem/Assets/Script/test.cs

43 lines
683 B
C#

using System;
using UnityEngine;
using UnityEngine.UI;
namespace Script
{
public class test : MonoBehaviour
{
public Texture2D ttt;
public void HHHH()
{
}
private ModbusTcpClient client;
public RawImage raw;
private void Start()
{
hh();
}
async void hh()
{
// 使用
client = new ModbusTcpClient();
await client.ConnectToServer();
Debug.Log("123");
}
private void OnDestroy()
{
client.CloseConnection();
}
}
}