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
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.