I’ve been trying to fix this for about 2 days or so, and i’ve searched all over the ask and forums for an answer.
Here’s my question:
I have been trying to just do a very simple test deployment for Flash but it seems that no matter if I use Input.GetAxis or Input.GetKey it will work in unity’s editor, but it will not work in the Flash.swf file that I build it to.
Here’s my build: I’ve just made a cube that has a script attached to let the user move it left or right based on the arrow keys or ‘A’ or the ‘D’ keys.
The script is:
`
#pragma strict
function Update () {
var horizontal:float = Input.GetAxis("Horizontal");
transform.Translate(horizontal, 0, 0);
}`
and the script is attached to the cube. Again it works perfectly fine in editor but doesn’t work at all when it’s deployed to Flash. also when I use Input.GetKey it doesn’t work.