Hello community !
First, i’m sorry for my english.
I’m Trying to create a application on Android with a mobile connected to a screen by a MHL USB to MHL Connection. I already have my mobile main screen duplicated on the TV i’m using.
I’m Using The Display class and i already recreated the script proposed by the Unity API, but i just have my main camera duplicated like the normal duplication of my Main screen when my app is running.
Here is my Code :
void Start () {
mainCam.SetTargetBuffers(Display.main.colorBuffer, Display.main.depthBuffer);
}
private void Update()
{
int nbDisplays = Display.displays.Length;
textInfo.text = ("we have " + nbDisplays + " displays connected to this device");
if(Display.displays.Length > 1 && !secondCam.enabled)
{
Display.displays[1].SetRenderingResolution(256, 256);
secondCam.SetTargetBuffers(Display.displays[1].colorBuffer, Display.displays[1].depthBuffer);
}
secondCam.enabled = Display.displays.Length > 1;
}
Do you have any idea on how to make this works for me ?
Any others possibilities to make multi-Displays on Android ?
I can’t find any exemples on the net, please help me !