unity on mousewheel down
if (Input.GetAxis("Mouse ScrollWheel") > 0f) // forward
{
}
if (Input.GetAxis("Mouse ScrollWheel") < 0f) // backwards
{
}
unity on mousewheel down
if (Input.GetAxis("Mouse ScrollWheel") > 0f) // forward
{
}
if (Input.GetAxis("Mouse ScrollWheel") < 0f) // backwards
{
}
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;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us