Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Gamesmold · Nov 19, 2013 at 09:14 PM · macloginfullscreengame centerretina

How to show Game Center dialog on Mac in Capture Display mode

My Mac app has just been rejected by Apple because the Game Center login dialog stayed hidden behind the actual app that was running in Capture Display Mode.

Now, "Capture Display" seems to be the only MacFullScreenMode that allows rendering in Retina resolution on MacBook Pro - and Apple wants developers to support the Retina resolution.

But in that mode, the app does not automatically disappear to show the Game Center log-in dialog (which only happens in the other fullscreen modes with the pixelated virtual desktop resolution). The Game Center dialog just stays behind the fullscreen app and the authentication can't proceed.

Can the app somehow get a notification that the login dialog has appeared (and thus switch to window mode)? Or is there any workaround?

Cause if not, it's basically impossible to create a Mac app with Unity that supports Retina resolution and Game Center.

Thank you, Thomas

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Gamesmold · Nov 26, 2013 at 09:19 AM

OK, to solve this issue, you just have to listen for an OnApplicationPause event. This event will be triggered when the Game Center dialog opens (using the Prime31 plugin, as it is Game Center on Mac). Then simply let this event switch your app to window mode (if it was in fullscreen mode) and the dialog window becomes visible. As Game Center communication will always occur at the start of your app (and thus bring the possibility of a login window opening up), it also makes sense to always start your app in window mode, waiting till Game Center communication is done, and then going to fullscreen (if the user wants fullscreen - you can use PlayerPrefs to remember if the app had been run in fullscreen the last time). To make sure the app always starts in window mode before entering fullscreen, you can use PlayerPrefs.SetInt("Screenmanager Is Fullscreen mode", 0). Same with the preferred resolution, it's also stored there ("Screenmanager Resolution Width", "Screenmanager Resolution Height"). Feels like a hack, but works fine.

Always keep in mind, all this is only to achieve Retina resolution in CaptureDisplay mode.

Now, for the bad news - I did these changes to my app and it got rejected a second time because the mouse cursor did not map correctly to the UI in fullscreen mode. This is also an issue that only occurs in CaptureDisplay mode. On Retina MacBook Pro I solved it by using a Software Cursor (if Screen.height>=1600...), but this happened on an iMac (where I thought that there would be no cursor/resolution issues).

EDIT:

Just a quick update that now, after two rejections, the app has finally been approved! And I managed not to drop Retina support, though there were plenty of new issues to solve. For instance, as you have to use a software mouse cursor in capture display mode, the framerate must not drop to a too low speed. Otherwise your cursor will also begin to stutter badly.

Also, I could not find a single Unity app on the Mac App Store that does support Retina resolution. So I guess this might really be an interesting topic... I think I'll start a forum thread explaining my best practice experiences for making a Retina-enabled Mac app - which is, at the moment, definitely very, very difficult. For the cursor bugs, I've reported them to Unity, so here's hoping they will be fixed with a future update.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Stop the dialogue box from appearing on PC/Mac builds 2 Answers

How do I achieve pixel perfect text on retina displays? 2 Answers

Minimizing a Mac Fullscreen app 1 Answer

Default mac-fullscreen command 0 Answers

Fast app switching from fullscreen mode in OS X 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges