FIx bug animation not stop. add more QOL for test animation scene. add AnimationSceneSkillTest.md to show how to use
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CopyTextButton : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Text textToCopy;
|
||||
[SerializeField] private TMP_Text labelText;
|
||||
[SerializeField] Button button;
|
||||
public void Awake()
|
||||
{
|
||||
button.onClick.AddListener(CopyText);
|
||||
}
|
||||
public void CopyText()
|
||||
{
|
||||
GUIUtility.systemCopyBuffer = textToCopy.text;
|
||||
}
|
||||
public void SetText(string labeltext, string text, bool? inAddressables = null)
|
||||
{
|
||||
labelText.text = labeltext;
|
||||
textToCopy.text = text;
|
||||
if (inAddressables == null)
|
||||
labelText.color = Color.white;
|
||||
else
|
||||
labelText.color = inAddressables.Value ? Color.green : Color.red;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user