| | |
| | | using System; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using Cysharp.Threading.Tasks; |
| | | public class RichText : Text, IPointerClickHandler |
| | | { |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | public async UniTask AwakeAsync() |
| | | { |
| | | #if UNITY_EDITOR |
| | | if (UnityEditor.PrefabUtility.GetPrefabType(this) == UnityEditor.PrefabType.Prefab) |
| | | { |
| | | return; |
| | | } |
| | | #endif |
| | | unline = transform.GetComponentInChildren<TextUnline>(); |
| | | if (unline == null) |
| | | { |
| | | GameObject obj = await BuiltInLoader.LoadPrefabAsync("TextUnline"); |
| | | if (this == null) return; |
| | | obj = Instantiate(obj); |
| | | obj.transform.SetParent(transform); |
| | | obj.transform.localScale = Vector3.one; |
| | | unline = obj.GetComponent<TextUnline>(); |
| | | unline.raycastTarget = false; |
| | | } |
| | | } |
| | | |
| | | protected override void OnEnable() |
| | | { |
| | | base.OnEnable(); |