Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Input.GetAxisとCrossPlatformInputManager.GetAxis
using UnityEngine;
using System.Collections;
using UnitySampleAssets.CrossPlatformInput;
public class CrossPlatformMoveSphere : MonoBehaviour
{
void Update ()
{
// あふたー
var axis = CrossPlatformInputManager.GetAxis("Horizontal");
transform.position += Vector3.right * axis * Time.deltaTime;
}
}
using UnityEngine;
public class MoveSphere : MonoBehaviour
{
void Update ()
{
// びふぉあー
var axis = Input.GetAxis("Horizontal");
transform.position += Vector3.right * axis * Time.deltaTime;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.