Hi!
I need to keep the state of mouse on changing level.
I explain with a pseudo-code:
void Start()
{
if (Input.GetMouseButton(0))
{
isDown = true;
}
//isDown is always false :(
}
void Update()
{
if (Input.GetMouseButtonDown(0))
{
Application.LoadLevel(Application.loadedLevelName);
}
}
After loading, I need to check if the mouse if down or not, but it seems the internal mouse state is reset when I call Application.LoadLevel. Even
Input.GetMouseButtonUp(0);
return always false until I release the mouse button, then I push on the mouse button and I release it again.
Any idea?
Thanks.