您当前的位置: 首页 >  unity

unity工具人

暂无认证

  • 4浏览

    0关注

    205博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

unity雷达交互

unity工具人 发布时间:2021-12-10 20:41:49 ,浏览量:4

插件:TouchScript 1.相机挂脚本 在这里插入图片描述 2.场景中添加脚本 在这里插入图片描述 3.新增脚本

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//需要引入这两个命名空间
using TouchScript;
using TouchScript.Pointers;

public class TuioListener : MonoBehaviour
{
    void Start()
    {
        TouchManager.Instance.PointersPressed += OnPointersPressed;
    }

    private void OnPointersPressed(object sender, PointerEventArgs e)
    {
        Debug.Log("[Test] OnPointersPressed");
        //打印所有触点信息
        IList pointers = e.Pointers;
        for (int i = 0; i             
关注
打赏
1656671177
查看更多评论
0.0388s