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

StackOverflow https://stackoverflow.com/questions/23237919

質問

  • 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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top