About Unity3D 4.1.2 (to continue…)

2019-03-02 23:44|来源: 网路

Here are something that need to take care of when you work with Unity3D:

1) It seems Unity3D could could work better with Maya than 3D Max. Expecially when you do normal mapping, mirror models; (material setup is not correct may cause such problem,)

2) Unity Ray trace may ignore those trigger volumes that include the trace line start point;

3) ‘Update’ will execute once per-frame, and ‘FixedUpdate’ will execute with some frequency that not go with frame update;

4) Unity shader provide some random function in the shader, that could provide some with the flexibility to random choose one part of the texture per frame. For some vfx like storm, rain and so on,  you do not need to create serveral animation frames, you just need to create a shader with randomly pick one sub-part of texture;

5) It seems Unity3D prefer to use uniform scale for physics box colliders;

6) Remember to check ‘Shrink to Fit’ option for some dynamic font, especially after you add some new text;

7) Please use ‘GUI texture’ for VFX and Particles, such kind of texture will discard mip-maps compared to ‘Texture’. VFX with mip-maps will cause some problems when run on the real devices like ios or android.


转自:http://www.cnblogs.com/open-coder/p/3308975

相关问答

更多
  • 去找找杨中科老师的,他讲的unity3d很牛B。
  • PUN不支持像Phtoon Turnbased一样重新加入(保留了演员编号和玩家状态)。 因此,您需要处理断开连接事件并再次重新连接为新玩家,并使用断开连接的播放器状态更新此播放器状态(有时可能很棘手)。 您可能会发现更容易在房间属性中存储所有状态,并通过名称或userId引用那里的玩家。 PUN does not support rejoin as Phtoon Turnbased does (with actor number and player state preserved). So you ne ...
  • 我认为最好使用时间独立的动画系统而不是Unity的传统动画。 传统动画在很大程度上依赖于帧,并且它在不同设备上的行为不同(由于帧速率不同),即使在同一设备上,由于设备的当前性能,它也可能不同。 尝试像iTween这样的东西,或者做动画或HoTween来处理动画。 I think it better to use a time independent animation system instead of Unity's legacy animation. Legacy animation is heavil ...
  • 我找到了解决方案,混合了线程和协同程序。 我真的不喜欢C#中的线程样式编程,因为得到的结果不能清楚地理解 - 代码并不好。 所以,这是我的解决方案,使用Foundation.Tasks 想象一下,例如,我们有一些MonoBehaviour子类,做了一些繁重的计算。 UnityTasks之前的代码 public class ExampleClass : MonoBehaviour { public bool MyHeavyCalculator(bool exampleArg) { //loon ...
  • 试试这段代码: public string deviceName; WebCamTexture wct; void Start () { WebCamDevice[] devices = WebCamTexture.devices; deviceName = devices[0].name; wct = new WebCamTexture(deviceName, 400, 300, 12); GetComponent ().material.mainTex ...
  • 我发现了问题所在。 每个变量的值也应该是一个字符串。 所以在这种情况下例如 "direction": [ -0.21788, 0.396045, -0.892007 ], 应该: "direction": [ "-0.21788", "0.396045", ...
  • 是的,只夹x值: Vector3 clampVel = rigidBody.velocity; clampVel.x = Mathf.Clamp(clampVel.x, min, max); rigidBody.velocity = clampVel; Yes, clamp only x value: Vector3 clampVel = rigidBody.velocity; clampVel.x = Mathf.Clamp(clampVel.x, min, max); rigidBody.velo ...
  • 文件导航就像使用.net 2.0文件浏览功能一样简单。 http://msdn.microsoft.com/en-us/library/system.io%28v=vs.80%29.aspx 然而,你会遇到很多令人头痛的问题,试图让Unity与Android的Intent广播公司/接收者一起玩,并且需要大量摆弄Java以启动其他活动。 http://developer.android.com/training/basics/firstapp/starting-activity.html The file n ...
  • 将碰撞器和RigidBodies添加到对象。 在框中添加一个脚本,在OnCollisionEnter函数中将该框标记为RigidBody组件中的isKinematic,同时启动一个协程等待3秒。 3秒isKinematic设置为false。 void OnCollisionEnter(Collision collision) { if(!collidedWithOtherObject) { collidedWithOtherObject = true; this.G ...
  • 问题1。 到处使用“Debug.Log” void OnTriggerEnter(Collider otherObject) { Debug.Log("in trig"); Debug.Log("otherObject.gameObject.tag is " + otherObject.gameObject.tag); if (otherObject.gameObject.tag == "Enemy") { Debug.Log("a"); damageTarg ...