unity3d开发3D 游戏android游戏触摸屏设置的编程也在unity3d中进行还是在eclipse中

发布网友

我来回答

2个回答

热心网友

unity3d 写代码只要自带的mono , 看android 的日志用eclipse;
// 通过 Input.touches 获得多点触控数据,

void Update ()
{
foreach (Touch touch in Input.touches) {
string action = "";
switch (touch.phase) {
case TouchPhase.Began:
action = "开始";
break;
case TouchPhase.Moved:
action = "移动";
break;
case TouchPhase.Stationary:
action = "停留";
break;
case TouchPhase.Ended:
case TouchPhase.Canceled:
action = "结束";
break;
}
Debug.Log (string.Format ("fingerId:{0},action:{1},position:{2}", touch.fingerId, action, touch.position));
}
}

热心网友

在Unity3d中,不需要eclipse,unity3d自身就可以将同一个工程发布到多个平台的

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com