Home > Mobile >  When I use the miracast screen into a black screen
When I use the miracast screen into a black screen

Time:12-04

You well


We have to make a project early education robot, this project use the Unity is responsible for the visual part of the robot, Android is responsible for the logic part,
Unity version is 5.6.7,
Android is 8.0, the

After the project is Unity export Android project, again with Android into a APK Android platform again after execution,
When I use the miracast screen, there is a big opportunity is black screen directly,

But the part if direct Export to separate APK for screen, but there is no problem,

I wonder if you advanced to such problem with a clue to the next to find out the source of the problem?

Android's contact way is as follows:

@ Override protected void onResume () {
Super. OnResume ();
MUnityPlayer. Resume ();
MUnityPlayer. WindowFocusChanged (true);
If (beforeHideX==- mScreenWidth) {
MParams. X=0;
MParams. Y=0;
} else {
MParams. X=beforeHideX;
MParams. Y=beforeHideY;
}
MWindowManager. UpdateViewLayout (mUnityPlayer mParams);
}
  • Related