using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Sirenix.OdinInspector;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using XericLibrary.Runtime.MacroLibrary;
using XericLibrary.Runtime.Type;
namespace Deconstruction.UI.TmpText
{
///
/// TMP超链接点击管理组件
///
public class TMPHyperlinkManager : MonoBehaviour
{
///
/// 画布组件
///
#if ODIN_INSPECTOR
[LabelText("画布*")]
#endif
[Tooltip("组件可为空,将自动向上查找")]
[SerializeField]
public Canvas canvas;
#if ODIN_INSPECTOR
[LabelText("点击超链接时回调")]
#endif
[SerializeField]
public UnityEvent onClickLink = new UnityEvent();
///
/// 当前摄像机
///
private Camera _camera;
///
/// 存储链接ID与对应回调函数的映射
///
private Dictionary _linkCallbacks = new Dictionary();
protected void Awake()
{
if (canvas == null)
canvas = transform.GetParents().Startup(transform).GetComponent