简体   繁体   English

在构建模式下调用登录Facebook(unity facebook sdk 5.1)时如何保持游戏状态不隐藏

[英]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 . 我使用unity-facebook-sdk 5.1创建应用程序。 When i build apk with portrait screen, my game not hide: portait screenshot . 当我用纵向屏幕构建apk时,我的游戏没有隐藏: portait屏幕截图 When i build apk with landscape left mode, my game screen is black: lanscape screenshot . 当我使用横向左模式构建apk时,我的游戏屏幕为黑色: lanscape屏幕截图 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: 您可以在android清单中根据需要进行设置:

<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 android:theme是半透明的-表示您的游戏将在登录对话框下可见

<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 android:theme不是半透明的-登录对话框具有黑色背景

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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