摘要:
1.编辑器脚本需要放到Editor文件夹下面 简单操作,快速让锚点分布在组件四个顶点 选中组件(可以单选,可以多选) 点击Tools/自适应锚点 代码如下: using System.Collections; using System.Collections.Generic; using Unity 阅读全文
摘要:
1. 编辑器脚本,方便快捷,省时省力(适合替换同一种材质球) 放在Editor文件夹下 直接上代码 using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; // 阅读全文
摘要:
unity连接modbus需要有NModbus4.dll文件 文件地址: (下载地址) 1.配置一个modbus主站(MThings测试软件挺好用的) 2.unity用来连接 下面直接上代码 using Modbus.Device; using System; using System.Collec 阅读全文
摘要:
代码如下: using System.Collections; using System.Collections.Generic; using UnityEngine; public class FeiXian : MonoBehaviour { public Transform pos0; //位 阅读全文
摘要:
1.问题 使用videoplayer播放视频,切换视频的时候会显示上一个视频的最后一帧 解决办法 videoplayer用了targenTexture ,释放一下视频,感觉是有缓存, 可以在视频关闭的时候加入下列代码 public VideoPlayer vidoPlayer; public voi 阅读全文
摘要:
退出系统的时候会弹出来,ALT+f4也可以弹出来 直接上代码吧 using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System; using 阅读全文