Hi,
I need to create a fade script to work for multiple displays, but I’m not sure how to go about this without setting up multiple canvases. I’m taking over the work from a previous developer who developed our Unity application with a stretched-desktop (as he was using an old version of Unity). I’ve updated the code to use multiple displays, but I’m stuck when it comes to updating his “fade” script. It looks as though his code uses the immediate mode GUI API;
function OnGUI()
{
// ...some other code...
GUI.DrawTexture(Rect(0, 0, Screen.width, Screen.height), fadeOutTexture);
}
If I’m correct, the “OnGUI” callback processes events for all screens. If this is the case, then I’m sure there’s a way to specify the target display that I wish to draw the texture to.