Search Unity

Problem with gui text button

Discussion in 'Editor & General Support' started by elias723, Apr 12, 2006.

  1. elias723

    elias723

    Joined:
    Feb 10, 2006
    Posts:
    178
    I'm trying to make a button on the screen that allows me to switch between being able to move the camera and not being able to do so. I'm using 1.2.1, and my problem is that the OnMouseEnter and OnMouseExit functions for the guiText button don't work quite right. The guiText word may be written anywhere on the screen I want it to be, but the area it thinks is the button for which it should call OnMouseEnter/Exit is always about a quarter of the screen further to the left. This clearly is not what I want, since I want the button to be where the word is. Any settings to fiddle with to fix this?
     
  2. Bampf

    Bampf

    Joined:
    Oct 21, 2005
    Posts:
    369
    I reported a bug several versions ago where, if you selected a ratio like 5:4 in the Game View, some mouse coordinates were not adjusted accordingly. I believe it was GUITextures that were the problem. If your behavior is happening in the Game View, try it again with no ratio selected or in a build application and see if the problem goes away.

    I can't reproduce it anymore in 1.2.2, so either they fixed it or something changed in my game to fix it. I suspect the former.
     
  3. elias723

    elias723

    Joined:
    Feb 10, 2006
    Posts:
    178
    Thanks bampf - that was exactly my problem.