//
//
//
// Set focus to a given photonView when pointed is over
//
// developer@exitgames.com
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using UnityEngine.EventSystems;
namespace Photon.Pun.UtilityScripts
{
///
/// Set focus to a given photonView when pointed is over
///
public class OnPointerOverTooltip : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
{
void OnDestroy()
{
PointedAtGameObjectInfo.Instance.RemoveFocus(this.GetComponent());
}
#region IPointerExitHandler implementation
void IPointerExitHandler.OnPointerExit (PointerEventData eventData)
{
PointedAtGameObjectInfo.Instance.RemoveFocus (this.GetComponent());
}
#endregion
#region IPointerEnterHandler implementation
void IPointerEnterHandler.OnPointerEnter (PointerEventData eventData)
{
PointedAtGameObjectInfo.Instance.SetFocus (this.GetComponent());
}
#endregion
}
}