OnMouseEnter bug?

I wrote below script and I think unity got a bug.

public class GUITextureScript: MonoBehaviour {

void OnMouseEnter()
{
Debug.Log(“OnMouseEnter”);
}

void OnMouseExit()
{
Debug.Log(“OnMouseExit”);
}

void OnGUI()
{

}
}

  1. create GUITexture GameObject
  2. add above script
  3. place mouse pointer above GUITexture gameObject and stand still
  4. press any key in keyboard

when doing above step OnMouseEnter() and OnMouseExit() is called according to key press by each frame.

Deleting OnGUI() declaration can fix this problem but OnGUI() fuctnion declared in another script reproduce OnMouseEnter bug.

Is anybody help me out?

I’m not english speaker and I hope you to be understood my question.

Hi, welcome to the forum!

This is indeed a bug and has been recently reported to the QA team. Thanks for posting it, though - we’d rather hear about a bug twice than not at all :wink:

Will this bug be fixed in 3.0 ?

Not too sure about the status of this. The bug’s case number is 312053 - you can contact support@unity3d.com directly about it if you need an update.

Is anyone able to test if this issue is gone with 3.0?