一些unity问题的收集

---恢复内容开始---

1.Mono打不开且鼠标点击标签页无反应的解决办法

http://answers.unity3d.com/questions/574157/monodevelop-not-opening-in-unity-43.html0

2.Rename: Ctrl + H (Mono暂时没有好的rename方案)

在场景中飞行 : 鼠标右键 + WASD 按住Shift 会提速

3.将场景中的物体拖入Project,能生成其Prefab

Vetor3.Lerp(start,end,frac) 用于线性插值(其中frac为[0,1])

4.使用#define 需要在文件的第一个分号之前

Cannot define or undefine preprocessor symbols after first token in file

5.C#中var关键字

http://blog.csdn.net/courageously/article/details/5695626

6.svn冲突:先删除了本地冲突的文件,再更新则可解决此问题

7.Vector3.magnitude Returns the length of this vector (Read Only).

8.DrawGizmos的时候tiff格式的缩写为tif

9.将动画调整为loop才会一直循环,否则在该状态下,该动画只会播放一遍!

10.Random.Range

static float Range(float min, float max);
Description

Returns a random float number between and min [inclusive] and max [inclusive] (Read Only).

static function Range(min: int, max: int): int;
Description

Returns a random integer number between min [inclusive] and max [exclusive] (Read Only).

 

11.m_aniInfo = m_animator.GetCurrentAnimatorStateInfo(0) 要在Update中调用,否则后面的判断可能出现不正确的情况

 

12.Input.GetKeyUp(KeyCode.Space)   Input.GetKeyUp("space")

原文地址:https://www.cnblogs.com/ak198806/p/3711893.html