Negin Soltani 37239732ac Initial Push
- Globe Asset
- Spatial Anchors
- Photon Implementation
- Scripts for Globe Control and Initial Country Colorizing
- Script for Reading csv file
2024-05-16 14:41:23 +02:00

46 lines
1.2 KiB
C#

// <copyright file="OnPointerOverTooltip.cs" company="Exit Games GmbH">
// </copyright>
// <summary>
// Set focus to a given photonView when pointed is over
// </summary>
// <author>developer@exitgames.com</author>
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using UnityEngine.EventSystems;
namespace Photon.Pun.UtilityScripts
{
/// <summary>
/// Set focus to a given photonView when pointed is over
/// </summary>
public class OnPointerOverTooltip : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
{
void OnDestroy()
{
PointedAtGameObjectInfo.Instance.RemoveFocus(this.GetComponent<PhotonView>());
}
#region IPointerExitHandler implementation
void IPointerExitHandler.OnPointerExit (PointerEventData eventData)
{
PointedAtGameObjectInfo.Instance.RemoveFocus (this.GetComponent<PhotonView>());
}
#endregion
#region IPointerEnterHandler implementation
void IPointerEnterHandler.OnPointerEnter (PointerEventData eventData)
{
PointedAtGameObjectInfo.Instance.SetFocus (this.GetComponent<PhotonView>());
}
#endregion
}
}