# UI Elements Missing in Build

**URL:** <https://discussions.unity.com/t/ui-elements-missing-in-build/747514>\
**Category:** Mobile\
**Tags:** Android\
**Created:** [June 17, 2019, 7:09pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514 "2019-06-17T19:09:10Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 17, 2019, 7:09pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/1 "2019-06-17T19:09:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JeffDUnity3D](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jeffdunity3d/32/196739_2.png) [@JeffDUnity3D](https://discussions.unity.com/u/JeffDUnity3D)\
**Post date:** [June 17, 2019, 9:17pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/2 "2019-06-17T21:17:46Z")

</div>

Please provide the device logs. The syntax I use is “adb logcat | grep -i unity”. On Windows, use findstr instead of grep

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 18, 2019, 4:29am UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/3 "2019-06-18T04:29:23Z")

</div>

Thanks for the reply!

I don’t know what are device logs and/or how to get them…

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 18, 2019, 4:29am UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/4 "2019-06-18T04:29:58Z")

</div>

It is only my second project in unity…

---

<div class="post-metadata">

**Author:** ![Tomas1856](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@Tomas1856](https://discussions.unity.com/u/Tomas1856)\
**Post date:** [June 18, 2019, 9:32am UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/5 "2019-06-18T09:32:08Z")

</div>

Please read more about logs here - [Unity - Manual: Log files](https://docs.unity3d.com/Manual/LogFiles.html)

---

<div class="post-metadata">

**Author:** ![JeffDUnity3D](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jeffdunity3d/32/196739_2.png) [@JeffDUnity3D](https://discussions.unity.com/u/JeffDUnity3D)\
**Post date:** [June 18, 2019, 2:32pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/6 "2019-06-18T14:32:54Z")

</div>

> [@How To - Capturing Device Logs on Android](https://discussions.unity.com/t/699654):
>
> For troubleshooting and debugging, it is often very helpful to capture the device logs. The device logs contain information about the status of a running application on the device and any errors encountered. The IAP Engineering team requires logs for open issues. It is assumed here that you have an Android device configured with Developer options and attached to a PC with a USB cable. These steps show the process on a Windows system and works similarly on a Mac In Unity, find the location of …

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 18, 2019, 2:42pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/7 "2019-06-18T14:42:24Z")

</div>

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](https://discussions.unity.com/uploads/short-url/s8oITFDrnUiOb8R0gbR5bphCpld.txt) (8.55 KB)

---

<div class="post-metadata">

**Author:** ![JeffDUnity3D](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jeffdunity3d/32/196739_2.png) [@JeffDUnity3D](https://discussions.unity.com/u/JeffDUnity3D)\
**Post date:** [June 18, 2019, 2:48pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/8 "2019-06-18T14:48:14Z")

</div>

That’s the player log. Please see my post above for capturing the device logs.

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 18, 2019, 5:20pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/9 "2019-06-18T17:20:56Z")

</div>

I’ve followed the explanation in the your other post, adb logcat | findstr -i unity returns nothing…

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 18, 2019, 5:23pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/10 "2019-06-18T17:23:06Z")

</div>

And once “adb logcat | findstr -i unity” is run command prompt stops working

---

<div class="post-metadata">

**Author:** ![JeffDUnity3D](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jeffdunity3d/32/196739_2.png) [@JeffDUnity3D](https://discussions.unity.com/u/JeffDUnity3D)\
**Post date:** [June 18, 2019, 9:41pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/11 "2019-06-18T21:41:49Z")

</div>

> [@RudisYuval](#):
>
> I’ve followed the explanation in the your other post, adb logcat | findstr -i unity returns nothing…

It will always return something if it’s working. Ensure “adb devices” works first, then “adb logcat”, etc.

1. Plug in Android device with USB cable, and ensure developer mode is enabled
2. Run “adb devices”, it should show a deviceid
3. Run “adb logcat | grep -i unity” (or findstr) and leave it running
4. Run the game on your phone
5. 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

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 19, 2019, 6:02am UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/12 "2019-06-19T06:02:52Z")

</div>

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](https://discussions.unity.com/uploads/short-url/j4qwWDDt89aJPpc4TAkfwH4sYkD.txt) (69 KB)

---

<div class="post-metadata">

**Author:** ![JeffDUnity3D](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jeffdunity3d/32/196739_2.png) [@JeffDUnity3D](https://discussions.unity.com/u/JeffDUnity3D)\
**Post date:** [June 19, 2019, 11:31am UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/13 "2019-06-19T11:31:12Z")

</div>

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.

[![](https://europe1.discourse-cdn.com/unity/original/4X/7/c/8/7c8bb71510fc00d35b6650673621a32f04c2a032.jpeg "Debugging Unity Apps") ](https://www.youtube.com/watch?v=A-Q5BsnnXZ8)

---

<div class="post-metadata">

**Author:** ![Tomas1856](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@Tomas1856](https://discussions.unity.com/u/Tomas1856)\
**Post date:** [June 19, 2019, 1:40pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/14 "2019-06-19T13:40:52Z")

</div>

P.S I see you’re using Unity 2019.1, so I’ll advertise a bit this package - [Android Logcat Package Feedback](https://discussions.unity.com/t/724316) , which makes acquiring logs from the device much easier.

Also try using Development player, it might show more info.

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 19, 2019, 3:25pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/15 "2019-06-19T15:25:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tomas1856](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@Tomas1856](https://discussions.unity.com/u/Tomas1856)\
**Post date:** [June 19, 2019, 3:46pm UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/16 "2019-06-19T15:46:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RudisYuval](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RudisYuval](https://discussions.unity.com/u/RudisYuval)\
**Post date:** [June 25, 2019, 11:22am UTC](https://discussions.unity.com/t/ui-elements-missing-in-build/747514/17 "2019-06-25T11:22:55Z")

</div>

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.
