Aetheria/Assets/Scripts/NIH/unity-ui-extensions/Examples/TextEffects/testHref.cs
hyperion51 c58ba0b1da Copy Aetheria Code
Added a bunch of code from the old Aetheria project
2020-02-27 18:51:07 +00:00

30 lines
No EOL
677 B
C#

/// Credit playemgames
/// Sourced from - http://forum.unity3d.com/threads/sprite-icons-with-text-e-g-emoticons.265927/
namespace UnityEngine.UI.Extensions.Examples
{
public class testHref : MonoBehaviour
{
public TextPic textPic;
void Awake()
{
textPic = GetComponent<TextPic>();
}
void OnEnable()
{
textPic.onHrefClick.AddListener(OnHrefClick);
}
void OnDisable()
{
textPic.onHrefClick.RemoveListener(OnHrefClick);
}
private void OnHrefClick(string hrefName)
{
Debug.Log("Click on the " + hrefName);
}
}
}