随笔分类 - Unity 3D
摘要:Performance is critical for mobile games, especially for fast-paced action games. As you probably know, we are currently making a pinball gamefor iOS / Android. It features fast physics combined with fully animated characters and a 3D world. Any pinball game needs 60 frames per seconds of performanc
阅读全文
摘要:Look at this forum thread: How to get Dynamic Batching to work?Offical doc:Draw Call BatchingUnity can automatically batch moving objects into the same draw call if they share the same material.Dynamic batching is done automatically and does not require any additional effort on your side.When Static
阅读全文
摘要:Lightmap-BeastLODOcclusion CullingLightmap-Beast动态实时灯光相比静态灯光,非常耗费资源。所以除了能动的角色和物体(比如可以被打的到处乱飞的油桶)静态的地形和建筑,通通使用Lightmap。强大的Unity内置了一个强大的光照图烘焙工具Beast,这个东东是Autodesk公司的产品(可怕的垄断,感觉和3d沾边的软件丫都要插一手)。据说用来制作过杀戮地带和镜之边缘。 镜之边缘建筑场景漂亮干净的光影,Lightmap的效果。在Unity中制作Lightmap很方便,调节几个参数后直接烘焙即可。支持GI,Skylight,效果一流!!!当然你需要一台好
阅读全文
摘要:关于这次的文章,主要需要涉及到以下内容:1.U3D中用代码动态生成片并设置UV坐标显示图片; 如果这方面还不知道,可以看看另篇文章:http://blog.csdn.net/midashao/article/details/81391092.C#版本的LitJson库的简单使用; LitJson官方地址:http://litjson.sourceforge.net/,本人也是刚使用这条内裤,如果不知道Json是神马东西,问下谷哥和度娘吧~什么是TexturePacker? 用过cocos2d的同学应该对这个比较了解吧(了解到可以直接无视下面的解释了~),不了解也没关系,TexturePac..
阅读全文
摘要:1.把开始时间设定到播放完成的时间点,作为倒放的起点 animation["clip"].time=animation["clip"].clip.length; animation["clip"].speed=-1; animation.Play("clip");2.寻找场景中物体var door = GameObject.Find("door").transform;3.全局变量用法,A.js 里的 static var AAA 到 B.js 里调用方式为 A.AAA4.function Aw
阅读全文
摘要:1.Shoot,Throw|Instantiatevar speed = 3.0;var grenadePrefab:Transform; function Update () { //find out if a fire button is pressed if(Input.GetButtonDown("Fire1")) { if(Collisions.GRENADE_AMMO > 0) { //create the prefab var grenade = Instantiate(grenadePre...
阅读全文