简体   繁体   中英

How to keep game state not hide when call login facebook (unity facebook sdk 5.1) with build mode Landscape

  • I create the app using unity-facebook-sdk 5.1 . When i build apk with portrait screen, my game not hide: portait screenshot . When i build apk with landscape left mode, my game screen is black: lanscape screenshot . Please help me out here.

this is by design, having your app in landscape and login flow in portrait settings cause some problems with rendering - but it looks like you want to use landscape orientation for login as well

you can set it up as you like in android manifest:

<activity 
   android:name="com.facebook.LoginActivity" 
   android:configChanges="keyboardHidden|orientation"         
   android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
</activity>

android:theme is Translucent - meaning you game will be visible under login dialog

<activity 
   android:name="com.facebook.LoginActivity" 
   android:configChanges="keyboardHidden|orientation"         
   android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>

android:theme isn't Translucent - login dialog has black background

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM