- Home /
Added Canvas element, can no longer run game as Windows Store App?
I'm building a super simple motion-control game. I've been developing on my Surface Pro so that I can easily test out the game. I need to build and run the game as a Windows Store App in order to access the accelerometer (and, I suspect, touch screen stuff). Originally I built it in Unity and ran it from Visual Studio, but since the first time I've been using Unity's Build and Run command.
I've just gotten to adding UI (starting with a button to zero out the tilt position), and I've discovered that the game no longer works as soon as I add any Canvas element. When I Build and Run, I get the Unity Splash screen, then a blank screen that crashes out to Metro after a couple seconds. The app is still there, but if I try to switch over to it, it holds on the blank screen for a little bit then kicks out to Metro. If I delete the Canvas and the Event Manager thing that it automatically creates, I'm able to build and run normally.
I just now tried building it in Visual Studio, but when I try opening the project I now get an error message saying that this version of Visual Studio can only run Windows Store Apps (which the project should be) This happens even without the Canvas game object in the scene now.