TestScript.cs 986 B

1234567891011121314151617181920212223242526272829303132
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using System.Collections.Generic;
  4. public class TestScript : MonoBehaviour
  5. {
  6. #region Config
  7. //StartMark-Used by LabelUtility-Do not remove
  8. private Text Title;
  9. private Text Content;
  10. private Button Button;
  11. private Button Panel;
  12. //EndMark-Used by LabelUtility-Do not remove
  13. #endregion
  14. private void Regist()
  15. {
  16. //RegistStartMark-Used by LabelUtility-Do not remove
  17. Dictionary<string, Transform> childDictionary = new Dictionary<string, Transform>();
  18. Auxiliary.CompileDic(transform, childDictionary);
  19. Title = childDictionary[TestLabel.Title].GetComponent<Text>();
  20. Content = childDictionary[TestLabel.Content].GetComponent<Text>();
  21. Button = childDictionary[TestLabel.Button].GetComponent<Button>();
  22. Panel = childDictionary[TestLabel.Panel].GetComponent<Button>();
  23. //RegistEndMark-Used by LabelUtility-Do not remove
  24. }
  25. //EventStartMark-Used by LabelUtility-Do not remove
  26. //EventEndMark-Used by LabelUtility-Do not remove
  27. }