摘要:敌人间隔5-10s开枪,有子弹从我眼前飞过,粒子使用lean缓冲池循环使用 敌人: using Lean.Pool; using System.Collections; using System.Collections.Generic; using UnityEngine; public class
阅读全文
摘要:using System.IO; using UnityEngine; public class MyLogCallback : MonoBehaviour { FileInfo fileInfo; StreamWriter m_writer; System.Text.UTF8Encoding en
阅读全文
摘要:点击VR一体机上触摸板,可使滑块定位,与按钮响应 InputModuleManager 改为PointerDown,因为滑块之类的无点击事件 增加按钮响应,把监听click改为监听down using UnityEngine; using System.Collections; using Unit
阅读全文
摘要:导入的视频不能直接放StreamingAssets下,否则不可识别为视频文件 使用2比1的全景视频,把VedioPlayer组件加到球体上。 因为球体是使用mesh,会受到光照的影响,导致视频可能出现一边明一边暗情况,所以把球的shader换为自发光
阅读全文
摘要:Shader "Custom/AlphaSelfIllum" { Properties { _Color ("Main Color", Color) = (1,1,1,0) _SpecColor ("Spec Color", Color) = (1,1,1,1) _Emission ("Emmisi
阅读全文
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.OleDb; using System.Drawing; using S
阅读全文
摘要:using System.Collections; using System.Collections.Generic; using UnityEngine; public class TerrianTest : MonoBehaviour { public Terrain m_terrainFrom
阅读全文
摘要:因为对于旋转来说。360度是一个循环。-1° 也可以算是就是359° 而且unity就是这样认为的。面板上虽然显示的是-1。但是他运行时是359。 if(angle>60) transform.eulerAngles = new Vector3(60, transform.eulerAngles.y
阅读全文