mirror of
https://github.com/Dadechin/Unity-WebSocket.git
synced 2025-07-04 04:14:34 +00:00
29 lines
506 B
C#
29 lines
506 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace FishNet.Example.ColliderRollbacks
|
|
{
|
|
public class TextCanvas : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Text _text;
|
|
|
|
private static TextCanvas _instance;
|
|
|
|
private void Awake()
|
|
{
|
|
if (_instance != null)
|
|
Destroy(_instance.gameObject);
|
|
|
|
_instance = this;
|
|
}
|
|
|
|
public void SetText(string text)
|
|
{
|
|
_text.text = text;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
} |