// Use this for initialization void Start() { float screenWidth = Screen.width; float screenHeight = Screen.height; switch (textPositionOnScreen) { case TextPosition.topRight: this.guiText.pixelOffset = new Vector2(screenWidth / 2 - 100, screenHeight / 2); break; case TextPosition.topLeft: this.guiText.pixelOffset = new Vector2(-screenWidth / 2, screenHeight / 2); break; case TextPosition.bottomLeft: this.guiText.pixelOffset = new Vector2(-screenWidth / 2, -screenHeight / 2); break; case TextPosition.bottomRight: this.guiText.pixelOffset = new Vector2(screenWidth / 2, -screenHeight / 2); break; } instance = this; }
// Use this for initialization void Start() { float screenWidth = Screen.width; float screenHeight = Screen.height; switch (textPositionOnScreen) { case TextPosition.topRight: this.guiText.pixelOffset = new Vector2(screenWidth / 2-100, screenHeight / 2); break; case TextPosition.topLeft: this.guiText.pixelOffset = new Vector2(-screenWidth / 2, screenHeight / 2); break; case TextPosition.bottomLeft: this.guiText.pixelOffset = new Vector2(-screenWidth / 2, -screenHeight / 2); break; case TextPosition.bottomRight: this.guiText.pixelOffset = new Vector2(screenWidth / 2, -screenHeight / 2); break; } instance = this; }