빌드는 에러없이 잘되는데 유니티에서 실행하면 무한에러뜨네여 ㅠㅠ 왜인지 모르겠슴다...
using UnityEngine;
using System.Collections;
public class emform : MonoBehaviour {
public GameObject cube;
void Update () {
if (Input.GetTouch (0).phase == TouchPhase.Began) {
cube.GetComponent<MeshRenderer> ().material.color = Color.red;
}
if (Input.GetTouch (0).phase == TouchPhase.Moved) {
cube.GetComponent<MeshRenderer> ().material.color = Color.red;
}
if (Input.GetTouch (0).phase == TouchPhase.Ended) {
cube.GetComponent<MeshRenderer> ().material.color = Color.red;
}
}
}