[置顶] Unity3D一些问题的解决方法

Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!

去掉mesh collider


鼠标控制人物移动 点击NGUI界面的时候人也会走

UICamera.hoverObject!=null   就是点到了NGUI上


(未测试)分层,把不同的动画放入不同的动画层中,这样maya输出的fbx应该是能包含多段动画,而且每段动画都从frame1作为开头计算。

另外一种就是进入motionbuilder中归类整理成不同的clip

获取所有子对象

 function GetComponentsInChildren (type : Type, includeInactive : bool = false) : Component[] 

GetComponentsInChildren<Transform>(true);


动态改变NGUI UILabel的字体颜色 

("Label").GetComponent<UILabel>().color = new Color(45 / 255f, 223 / 255f, 255 / 255f);

 

Unity中protobuf的使用方法 :在Assets目录下面新建 smcs.rsp文件,并在其中写入  -unsafe 字符串,前后不加空格


文本框只显示两位数
1、Datetime.Now.Tostring("HH:mm:ss"); 显示:16:38:05    2、int i=5;    Textbox1.Text=i.Tostring("D2"); 显示:05

因为服务器一般没有显卡,所以用opengl方式运行导出的unity程序,给程序创建快捷方式像这样"C:\Program Files (x86)\Unity\Editor\Unity.exe" -force-opengl

VS2010中的虚线 Ctr+R,Ctr+W

MAC同时启动两个Unity    打开terminal 输入
open -n /Applications/Unity/Unity.app

你可能感兴趣的:(unity3d)