Gui Mouse Over Weirdness

Hi Folks,

I have a test scene with two GuiText objects. Each one has a script assigned to it called button (similar to the one found in the script tutorial):

function OnMouseEnter() {
	guiText.material.color = Color.red;
}

function OnMouseExit() {
	guiText.material.color = Color.white;
}

In the game view in Unity it behaves as expected (mouse over a guitext object and it turns red, leave it and it turns back to white). But, when I build the test game it’s a different story… one object doesn’t turn red when you mouse over it and the other objects turns both of the objects red.

Which is the expected behavior? The one in the game view or the build? If the build, how does one easily swap colors of a specific gui text object? If the game view, I suppose I should log a bug report?

Cheers,
Paul

The game view is the correct one…

Thanks Marble. Thought so… I’ll just send off a bug report then…

Cheers,
Paul

Is this on a Mac with Radeon X1600 card (MacBook Pro / iMac)? If so, then we noticed that as well in rare situations; and that looks like a driver bug.

The technical reason is that OpenGL texture environment’s color is not updated correctly in some situations. Reported to Apple like 3 months ago…

Hi Aras,

Yep, Radeon X1600 on a Intel Core Duo iMac. Is there a workaround of any kind?

Cheers,
Paul

We did not find the good&universal workaround yet (other than writing a custom shader for fonts that does not use texture env. color).

Hi,

I am neither using a mac nor an ATI and having a similar problem.
I have 3 GUItexts;

  • Play
  • Controls
  • Help

Whats interesting is that, the OnMouseEnter() was working perfectly last night and is not working at all this morning for the Web aspect ratio :(.

Works partially(only works for the “controls” menu item) for the free aspect and 5:4.

Im using Unity 3.1 on a PC with core2duo and integrated grafix.

Please help!!