Hi Everyone!
I’ve been Working on an android app (an AR architectural presentation), everything worked great until I built it. Once built, the app is missing several UI buttons (not all buttons!!), both in unity play mode and in android run. All the buttons still exist and respond in editor mode and those that did not disappear during build work great in the app!
Both surviving buttons and those who didn’t make it are identical (practically copies of the same button triggering different animations).
I am using Unity 2019.1.5 and the SDK, NDK etc downloaded via Unity Hub.
Did anyone run into something slimier? any fixes? or ideas of possible fixes?
Thank you for any help
Please provide the device logs. The syntax I use is “adb logcat | grep -i unity”. On Windows, use findstr instead of grep
Thanks for the reply!
I don’t know what are device logs and/or how to get them…
It is only my second project in unity…
Please read more about logs here - Unity - Manual: Log files
this is the player log, only thing that popped out is that it says vuforia engine failed to load at some point, but vuforia works both on device and in editor well. no errors any where.
4659980–438038–PlayerLog.txt (8.55 KB)
That’s the player log. Please see my post above for capturing the device logs.
I’ve followed the explanation in the your other post, adb logcat | findstr -i unity returns nothing…
And once “adb logcat | findstr -i unity” is run command prompt stops working
It will always return something if it’s working. Ensure “adb devices” works first, then “adb logcat”, etc.
- Plug in Android device with USB cable, and ensure developer mode is enabled
- Run “adb devices”, it should show a deviceid
- Run “adb logcat | grep -i unity” (or findstr) and leave it running
- Run the game on your phone
- Press ctrl+C to end the logcat capture.
Note that you can also call “adb logcat | grep -i unity > output.txt” to write to a text file
thank you for the help! still can’t figure out what might be wrong’no errors, exceptions or fails… the game loads and works fine except for the missing buttons…
4662269–438263–Logtext.txt (69 KB)
Good job getting the logs! Yes, I don’t see any errors. I might suggest using numerous Debug.Log statements in your code, they will show up in the logs too.
P.S I see you’re using Unity 2019.1, so I’ll advertise a bit this package - Android Logcat Package Feedback , which makes acquiring logs from the device much easier.
Also try using Development player, it might show more info.
Unfortunately I don’t write c# yet, working on it. Does it make sense that I am missing only some of the buttons? Since all buttons are essentially the same.
A longshot, but most likely the layouting for those buttons is wrong, when you build to Android, the game is ran with different resolution, so things might be layouted differently. In Editor’s game view, in toolbar, try setting a different resolution and see how your buttons react
Tried changing resolutions but it didn’t make a difference… all buttons are rect aligned to the same place, and all buttons are inside a game object set for the size of the UI.