Search Issue Tracker
By Design
Votes
0
Found in
5.6.0b11
Issue ID
890045
Regression
Yes
Gradle build with UI elements added inside Android Studio are not drawn
Reproduction steps:
1) Create new project
2) Export empty project with Gradle build
-- There are some changes which have to be done to the 'UnityPlayerActivity' class.
-- You can follow steps below or just download ConfiguredGradleBuilds.zip (link to OC cloud) with already configured gradle builds
3) Open exported build with Android Studio
4) Inside 'UnityPlayerActivity' class add:
LayoutInflater inflater = LayoutInflater.from(this);
View layout = inflater.inflate(R.layout.layout_test, mUnityPlayer, false);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
mUnityPlayer.addView(layout, layoutParams);
5) Import these classes (can be added by pressing alt+enter on errors, except 'layout', or manually) on top of a class:
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.view.ViewGroup;
6) Add 'layout_test.xml' to the "BugReport/src/main/res/layout/" folder
7) Deploy application
Actual result: Button appears as soon as game launches and disappears on loading screen (Unity splash screen).
Expected result: Button appears as soon as game launches and stays for whole duration of the game.
Note: Also reproduced with ADT
Regression appeared in 5.6.0b3
Reproduced with:
5.6.0b3, 5.6.0b11, 2017.1.0a4
Unable to reproduce with:
5.5.2p3, 5.6.0b2
DUT:
Samsung Galaxy S6 Edge, Android 6.0.1
Samsung Galaxy S3, Android 4.3
LG G3, Android 5.0
Comments (4)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
vourkosa
Jun 21, 2017 12:42
You can read more on what actually happened behind the scenes with this issue at the following article https://goo.gl/jMwQ21
zaniocz
Jun 20, 2017 15:04
Fixed in 5.6.1p4 (https://unity3d.com/unity/qa/patch-releases/5.6.1p4)
(916119) - Android: Fixed a regression where Banner Ads are invisible, but still clickable.
Cypras
May 17, 2017 20:22
How can we fix this with the banner ads?
plasticYoda
Apr 24, 2017 23:09
This also causes banner ad views to be drawn behind the main view.