ArrowDebugView.cs 553 B

123456789101112131415161718192021222324252627
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class ArrowDebugView : MonoBehaviour
  6. {
  7. public Text text;
  8. public GameObject panel;
  9. public Button tap;
  10. public static ArrowDebugView ins;
  11. public void AppendLog(string str) {
  12. text.text += str + "\n";
  13. }
  14. public void ClearLog() {
  15. text.text = "";
  16. }
  17. void Start() {
  18. ins = this;
  19. tap.onClick.AddListener(delegate() {
  20. panel.SetActive(!panel.activeSelf);
  21. });
  22. }
  23. }