Search Unity

GUI.Label overlaps and looks fuzzy in built game but looks fine in Unity Game View

Discussion in 'Immediate Mode GUI (IMGUI)' started by 420BlazeIt, May 11, 2015.

  1. 420BlazeIt

    420BlazeIt

    Joined:
    Aug 14, 2014
    Posts:
    102
    Heres the script:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Multiplayer : MonoBehaviour {
    5.  
    6.     void Start () {
    7.         Network.Connect("127.0.0.1", 26500);
    8.     }
    9.  
    10.     void OnFailedToConnect(NetworkConnectionError error) {
    11.         Network.InitializeServer(10, 26500, false);
    12.     }
    13.  
    14.     void OnGUI () {
    15.         if(Network.isServer) {
    16.             GUI.Label(new Rect(5, 5, 200, 50), "You are the server");
    17.         } else if (Network.isClient) {
    18.             GUI.Label(new Rect(5, 5, 200, 50), "You are a client");
    19.         } else if (!Network.isServer && !Network.isClient) {
    20.             GUI.Label(new Rect(5, 5, 200, 50), "You are not connected");
    21.         }
    22.     }
    23. }
    Heres how it looks in Unity:


    Heres how it looks when its built:


    Please help guys!
    Thanks for reading :D
     
  2. JacobK

    JacobK

    Joined:
    Jun 18, 2013
    Posts:
    20
    Looks to me like you don't have anything clearing the background, so the anti-aliasing is becoming thick white. Do you have an active camera in the scene with a clear flag set (Skybox or solid color)?