Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Game Development

I want to start the game using touch other then spacebar

I want to start the game using touch like for android games

1 Answer

Nick Pettit
Nick Pettit
Treehouse Teacher

Hi Atul,

This is a complicated answer and I can't write out all the code needed for you to do this, but I can point you in the right direction. In short, any calls made to the Input class will need to be ported to use the corresponding touch inputs instead. You can read more about the Input class here: http://docs.unity3d.com/ScriptReference/Input.html

More specifically, you'll want to look at the variables and methods on the Input class that have the word "Touch" in them. I hope that helps get you started!