Skip to content

Instantly share code, notes, and snippets.

@masayuki5160
Created November 19, 2013 12:37
Show Gist options
  • Save masayuki5160/7544723 to your computer and use it in GitHub Desktop.
Save masayuki5160/7544723 to your computer and use it in GitHub Desktop.
Unityでタッチしたらオブジェクトをけす。とりまiPhoneでも動くこと確認済み。
using UnityEngine;
using System.Collections;
public class testTouch : MonoBehaviour {
// Update is called once per frame
void Update () {
if( Input.GetMouseButtonDown(0) )
{
Destroy(gameObject);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment