Hi,
We are porting an iOS/Android game to WIindows 8 Store and are running into issues with the splash screen.
The game is designed to run in landscape mode only (we manually set the supported orientations in Visual Studio since there doesn’t seem to be an option in Unity itself for this platform).
When we run on windows phone, the splash screen shows up first as we expect (note that the sides below assume a portrait image since that is what both Unity and Visual Studio require… 480x800 etc.)
Within a few seconds, the splash screen rotates 90o and is shown truncated (notice how the white dashed areas are gone and we have black bars on either side) This is happening regardless of the orientation of the device at the time.
We are providing all the images in the required sizes in the project settings.
The issue seems to originate from the boilerplate code generated by Unity (I am assuming) in MainPage.xaml.cs specifically the following function:
private void PositionImage()
{
var inverseScaleX = 1.0f / DXSwapChainPanel.CompositionScaleX;
var inverseScaleY = 1.0f / DXSwapChainPanel.CompositionScaleY;
ExtendedSplashImage.SetValue(Canvas.LeftProperty, splashImageRect.X * inverseScaleX);
ExtendedSplashImage.SetValue(Canvas.TopProperty, splashImageRect.Y * inverseScaleY);
ExtendedSplashImage.Height = splashImageRect.Height * inverseScaleY;
ExtendedSplashImage.Width = splashImageRect.Width * inverseScaleX;
}
When running on a PC, the splash screen is centered and taking a 9th of the screen (different issue which already is listed in the forums) but the orientation is fine so we are unsure if and how we are supposed to modify the xaml to work in all cases.
Since the image is both cropped AND rotated we don’t really have a good way to provide a graphic that will work in all cases and we have some legal test to display here anyway (so switching to a simple graphic is not really an option).
Is this a known issue? Am I missing something with the way the splash screen is intended to work?
In case this isn’t an actual issue, what is the proper way to get a landscape only splash screen to work properly for all Windows 8 Store versions and enforce landscape?
We are using Unity 4.6.2f1 and Visual Studio Community 2013.
Thanks!
Stephane