GetMousebuttonDown unity
if (Input.GetMouseButtonDown(1))
//This is too stop spaming the gun
GetMousebuttonDown unity
if (Input.GetMouseButtonDown(1))
//This is too stop spaming the gun
how to fix on GetMouseButtonDown activating UI unity
using UnityEngine.EventSystems;
void Update()
{
if (Input.GetMouseButtonDown(0))
{
// This line prevents the Code from activating UI
if (EventSystem.current.IsPointerOverGameObject())
return;
// Put your code here
}
}
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