public Rect getScreenBoundsAA() { if (_screenBounds.x == -1f) { // here I suppose this game object has attached a GUICustomElement _screenBounds = GUIScreenLayoutManager.positionInScreen(GetComponent <GUICustomElement>()); } return(_screenBounds); }
public Rect getScreenBoundsAA() { // This method called only once if the gameobject is a non destroyable game object // if used with a Unity's GUITexture if (guiTexture != null) { return(guiTexture.GetScreenRect(Camera.main)); } // here I suppose this game object has attached a GUICustomElement else { return(GUIScreenLayoutManager.positionInScreen(GetComponent <GUICustomElement>())); } }