Hello!!
Maybe (or most likely) it’s a noob mistake, but I’ve been having problems with Input.GetMouseButtonUp.
When I started making the script I hadn’t problems but now it doesn’t recognice the input sometimes.
I’m using Update() (Not FixedUpdate())
Some pseudocode of my script would be something like this:
void Update(){
If GetMouseButtonDown{start time pressed}
If (!long time pressed){++ time)
If GetMouseButtonUp{
If/Else long time pressed {do one thing or another}
Clear Variables() //So it doesn't keep adding time
}
}
The problem isn’t the variable clean, maybe I could write when the mouse is clicked, but if the realease is not made then the really effective functions won’t be called.
What other things may be causing that it’s not called?
I’m using C sharp and one of the latest 2017 versions of Unity, in case it helps.
Thanks in advance for your help, and I’m sorry if I haven’t explained well the problem or if I made some languaje mistakes.