Two Question: Scripting Refferance and Build Platform

Hi,

I’m new to Unity, so to you this might seem like a retarted question. First, I can’t get any sense out of the scripting…refferance…thing (I repeat: retarted question). As a pure Artist, I don’t get it. What I mean is that I don’t get how the scripts work.

Also: say that I was making a platform game on a pc, and I scripted it to be such that if I pressed the “W” key, it would move my character forward. Suppose I publish my game and it becomes a hit, and I want to make it for android without taking tedeous effort. Would I have to change a script to say “Player Touches the Screen” would move my character forward? If not, how do I change the settings?

Thank You

For your second question, There is a way to make sure some common commands work on more than one platform.

Usually, instead of specifying W for forward, we specify vertical-axis and horizontal-Axis. This is accessible through Input.GetAxis(). This works for pc/mac and consoles.

For the mobile platforms however, the common control is the mouse. Any mouse click event is translated to touch events on mobile platforms.(of course the mouse button 1 only).

After that, you need to implement your own touch system for mobile platforms if you need more functionality.