Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Gord10's avatar
Gord10
Honored Guest
11 years ago

Half screen size in Mac builds

I'm having a strange problem. My Oculus Rift game runs perfectly in Windows. But when I move the project to Mac and have a build, the built app game covers only a quarter of screen (half width, half height). What could possibly be wrong? I tried Tuscany demo, it worked fullscreen without any problems.

I use Unity Pro 4.6.2, OSX Yosomite, 0.4.3.1 of Oculus Rift.

8 Replies

Replies have been turned off for this discussion
  • I believe this can happen when the wrong resolution or refresh rate is selected.

    Make sure you are running at 1920x1080 and at 75Hz refresh.
  • Gord10's avatar
    Gord10
    Honored Guest
    I resolved the problem by creating a new Unity project and copying assets to it. I couldn't understand what made the game unplayable in my previous settings.

    Apparently it is not a problem about monitor resolution or frequency. This new project (and other OR demos) runned successfully in the same monitor settings.
  • You probably adjusted the "virtual texture scale" by accident (on OVRCameraRig on the OVRManager component).
  • Jyakku's avatar
    Jyakku
    Honored Guest
    Unity also sometimes does some weird things with caching your resolution settings even if you change them in the Inspector. I had trouble with this a while ago, and to fix it I made a simple function to set the application to display on the Rift's native resolution if it isn't already.


    private void CorrectResolution()
    {
    Resolution nativeResolution = Screen.resolutions[Screen.resolutions.Length - 1];
    if(Screen.width != nativeResolution.width || Screen.height != nativeResolution.height)
    {
    Screen.SetResolution(nativeResolution.width, nativeResolution.height, true);
    }
    }


    Keep in mind that this sets the screen to its highest normal display resolution instead of 1920x1080, so on a screen that's not the DK2 it will still resize to fit the bounds. Hope this helps.
  • thorp's avatar
    thorp
    Honored Guest
    I'm seeing something similar. Is this what it looked like?

    smallImage.jpg

    My situation is:
    The app is running fine on the PC.
    Compiling via Unity 4.6 running on a PC. Testing on mac. Other Rift Mac Apps work fine.
    SDK 0.4.4, DK-2
    virtual texture scale = 1, Mac Resolution 1920x1080

    I'll try the solutions listed in this thread.
  • That will usually happen if virtual texture scale is less than 1.

    Also, make sure your are not cloning the Rift and the main monitor.
  • thorp's avatar
    thorp
    Honored Guest
    Thanks Cybereality. Jyakku's insightful code solved it for me. Thank you for posting it Jyakku.