Hi, I use ingame Screenshots as splash screens. It works excellent in fullscreen mode but I cant get it to work in windowed mode because I don’t know the position of my application window. Is there any way to get the screen coordinates of the application?
using this for capturing:
// Read screen contents into the texture
SplashScreen.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
SplashScreen.Apply();
I need something like Application.getScreenRect() to get the upper left cornor of my application on screen.
And why would you need the rect? ReadPixels reads the content within the game window, not behind the game window so the position of the rect on the screen should be of no importance as the coordinates are always 0,0 up to screen width / height
Also you can’t draw outside the unity window with unity functions
but perhaps I missunderstand why you would need it?
Thanks for the hint. My falt was reusing the texture without generating it new with the new dimensions after changing from full screen to windowed mode. So the size didn’t change…
Is there any way to do this without using plug-ins?
π
PS if I check ‘maximise on play’, it still isn’t quite fullscreen because there is a header and footer. So the problem remains of determining coordinates of the actual drawing surface.