コード例 #1
0
 public DGTooltipAnchor()
 {
     if (TooltipInfo == null)
     {
         TooltipInfo = new MessageTooltip();
     }
 }
コード例 #2
0
        void Awake()
        {
            OnTooltipAppear = new UnityEvent();

            //Needed when compononent is created by code.
            if (TooltipInfo == null)
            {
                TooltipInfo = new MessageTooltip();
            }

            if (TooltipInfo.MessageId == "" || TooltipInfo.MessageId == null)
            {
                TooltipInfo.MessageId = Utils.Utils.RandomString(6);
            }

            if (TooltipInfo.Anchor == null)
            {
                TooltipInfo.Anchor = this.gameObject;
            }
        }