Horje
unity know when mouse on ui Code Example
unity know when mouse on ui
using System.Linq;
using UnityEngine;
using UnityEngine.EventSystems;


public static bool IsPointerOverUIElement()
    {
        var eventData = new PointerEventData(EventSystem.current);
        eventData.position = Input.mousePosition;
        var results = new List<RaycastResult>();
        EventSystem.current.RaycastAll(eventData, results);
        return results.Where(r => r.gameObject.layer == 5).Count() > 0;
    }




Csharp

Related
set text in center wpf Code Example set text in center wpf Code Example
c# append to int variable Code Example c# append to int variable Code Example
c# datagridview hide column Code Example c# datagridview hide column Code Example
playerInputManager.JoinPlayer(....) Code Example playerInputManager.JoinPlayer(....) Code Example
c# add two int variables Code Example c# add two int variables Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12