Crash on scene load - java.lang.ClassCastException
I believe the following error to be some variable somewhere in my many files to be a float used like a int or somthing like that:
java.lang.ClassCastException: java.lang.Float
But for the life of me, I cannot find where this happens, debugged everything, and well maybe this info below can allow someone much smarter then myself get to the bottom of it. I am using Unity and the crash happens after everything in the scene is loaded.
Let me know if you need more information.
From the logcat:
W/dalvikvm( 3999): threadid=9: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 3999): FATAL EXCEPTION: GLThread 10
E/AndroidRuntime( 3999): java.lang.ClassCastException: java.lang.Float
E/AndroidRuntime( 3999): at android.app.ContextImpl$SharedPreferencesImpl.getInt(ContextImpl.java:2833)
E/AndroidRuntime( 3999): at com.unity3d.player.PlayerPrefs.GetInt(Unknown Source)
E/AndroidRuntime( 3999): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
E/AndroidRuntime( 3999): at com.unity3d.player.UnityPlayer.onDrawFrame(Unknown Sour开发者_StackOverflow社区ce)
E/AndroidRuntime( 3999): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
E/AndroidRuntime( 3999): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
It looks as if there's an entry in your user or application preferences that contains a float value, but which Unity expects to be an integer.
精彩评论