Search Unity

Black screen after game start on Mac OS

Discussion in 'Editor & General Support' started by Pharaoh35, Jan 27, 2014.

  1. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    Hi, in last versions of Unity I've noticed that sometimes screen is always black, but I can hear sounds of different scenes. It means that game is runing very well, but I can't see anything. There is now such problems on iOS devices. What it can be?
    Mac OS Mavericks, Unity3D 4.3.3. Thank you for help!
     
  2. Dave-xP

    Dave-xP

    Joined:
    Nov 8, 2013
    Posts:
    106
    maybe u forgot the light?
    no wait, people can't be dat stubid
     
  3. MDragon

    MDragon

    Joined:
    Dec 26, 2013
    Posts:
    329
    Other than lights, it could be your camera as well.

    However, I'm going to assume you thoroughly beta tested your game up to the point of at least running every scene, so this isn't the problem. Any other information we can go by?
     
  4. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    It is really strange thing, in editor always works perfect, but release build works 50/50 on different resolutions, after unity logo there is just black screen, but game is working behind it. Also, if I change from fullscreen to window mode through the menu bar, everything is appearing on the screen. I didn't test it on other pc. Maybe I have this problem only on my machine.
     
    Last edited: Jan 27, 2014
  5. t0bi

    t0bi

    Joined:
    Sep 24, 2014
    Posts:
    7
    Hello,
    I also got the same problem. For me the screen stays black in the Mac standalone player when I start the game in fullscreen (FullscreenWindow mode) at a non-native resolution. It works fine in native resolution, and it also works fine in windowed mode at any resolution.
    I reported a bug to Unity (will post the link once it appears in their issue tracker).
     
  6. HMXChace

    HMXChace

    Joined:
    Sep 24, 2014
    Posts:
    2
    I've had a similar problem, in Unity 4.5.3 and I narrowed it down to GUI text being displayed. Do you have any on your screen? I'm curious if it's the same issue.

    When in full-screen on mac on a non-native resolution, if there is a screen that has a GUI.Label drawing on it, the screen will go black. I did this for a test:

    public class guitest : MonoBehaviour
    {
    private bool mToggle = false;

    void Update ()
    {
    if(Input.GetKeyDown(KeyCode.A)) {
    mToggle = !mToggle;
    }
    }

    void OnGUI()
    {
    if (mToggle) {
    GUI.Label (newRect (0, 0, 200, 200), "test");
    }
    }
    }


    Hitting the "A" key would cause the screen to go black, hitting it again, would have the scene draw normally. If I was NOT in full-screen I could see the text and scene draw correctly. Being in the native resolution in full-screen would have the text appear properly as well.
     
  7. HMXChace

    HMXChace

    Joined:
    Sep 24, 2014
    Posts:
    2
    Update: I took a look at Unity 4.5.4 release notes, and I saw this gem:
    "Mac OS X: Fixed full screen rendering at less than native resolution."

    Building and running my above test the game works as expected. No more black screen!
     
  8. t0bi

    t0bi

    Joined:
    Sep 24, 2014
    Posts:
    7
    Hi HMXChance, thanks for pointing this out, 4.5.4 fixed it for me too! :)
     
  9. DOUAUD

    DOUAUD

    Joined:
    Sep 30, 2016
    Posts:
    5
    Hello everybody,
    Sometimes it could be solved by unchecking VR compatibility in player setting (Edit > Project Settings > Player / Virtual reality supported.:cool: