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
- Memory leak occurs when focused on Player while using Direct3D12
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
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.