Closed stanleyjoy closed 12 years ago
Hi
you can't directly in unity AFAIK but go into Game1.cs of FFWD template directory and Intercept back button there with this code
if (Microsoft.Xna.Framework.Input.GamePad.GetState(Microsoft.Xna.Framework.PlayerIndex.One).Buttons.Back == Microsoft.Xna.Framework.Input.ButtonState.Pressed) EventAggregatorService.service.sendMessage(this,UnifyInput.ON_BACK_BUTTON);
now EventAggregatorService.service.sendMessage(this,UnifyInput.ON_BACK_BUTTON); It's my event aggregator that send a message to unity and voila! back button works
I've a blog here www.bulldozer-mobile.com in next day I would post a series of article about my experience making a game in wp7 with unity :)
bye
If you look in the Input class you will se a slight hack for the Phone that allows you to call the Input.GetButton*("Back") methods and get the result of the back button. It will only work on the phone.
I want to track the Hardware back button in WP7 so that users can use that button to pause the game or move back in the main menu. The MenuUI is written in Unity C#, how do I go about and bring and different use to the back button other than quitting. Stan