Facebook Unity Sdk v5.0.3 crashes in Landscape mode when trying to login - Android

前端 未结 2 1567
别那么骄傲
别那么骄傲 2021-01-15 09:35

The game crashes when I click at login button as the game is in landscape mode. If I use portrait mode, everything works fine and correctly.

I got the following stac

相关标签:
2条回答
  • 2021-01-15 09:48

    yes, this is a bug, we are working on proper fix right now. Meanwhile you can edit your android manifest in Plugins/Android and add android:configChanges so that FBUnityLoginActivity isn't destroyed when orientation/whatever changes:

    <activity 
      android:name="com.facebook.unity.FBUnityLoginActivity" 
      android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
      android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
    </activity>
    

    you may also want to remove "Translucent" from activity style.

    0 讨论(0)
  • 2021-01-15 09:54

    I confirm that the change in the manifest file fixed the crash for me also. As additional info: the location of manifest the file was in Assets\Plugins\Android and the name was AndroidManifest.xml. I tested the fix on Sony Xperia M.

    0 讨论(0)
提交回复
热议问题