"Version control? Track changes?" sads :c

This commit is contained in:
alexiscatnip
2022-06-08 23:38:31 +08:00
parent 5e8a6cbf2b
commit 7552daf937
223 changed files with 13859 additions and 10355 deletions
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Serialization;
public class ClickEventDebugger : MonoBehaviour
{
[FormerlySerializedAs("text")] public TMPro.TMP_Text TMP_text;
void LateUpdate()
{
EventSystem eventSystem = EventSystem.current;
var obj = eventSystem.currentSelectedGameObject;
// if (obj is null) // this does NOT catch 'obj is missing reference'; only null.
// {
// return;
// }
if (!obj) //this catches 'missing reference '
{
return;
}
TMP_text.text = obj.name;
}
}