上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 43 下一页

2015年8月7日

unity, change parent and keep localPosition or worlPosition

摘要: node.parent=othernode等价于node.setParent(othernode,true),是保持世界坐标不变。 node.setParent(othernode,false)则可以实现保持node的局部坐标不变。 参考:http://tieba.baidu.com/p/43970 阅读全文

posted @ 2015-08-07 15:16 wantnon 阅读(441) 评论(0) 推荐(0)

unity, access sprite of UGUI Image

摘要: 首先需要usingUnityEngine.UI;然后调用下面语句就不报错了:Image.GetComponent().sprite参考:http://answers.unity3d.com/questions/794139/获得Image的width和height:Image.GetComponen... 阅读全文

posted @ 2015-08-07 13:20 wantnon 阅读(342) 评论(0) 推荐(0)

unity, UGUI Text outline

摘要: UGUI Text的勾边效果是通过添加component实现的:Add Component->UI->Effects->Outline参考:http://www.cnblogs.com/hont/p/4321347.html 阅读全文

posted @ 2015-08-07 13:11 wantnon 阅读(922) 评论(0) 推荐(0)

unity, sprite atlas

摘要: 一, Sprite Packer可以直接在unity里放碎图,只要将Texture Type选为Sprite(2D and UI),Sprite Mode选为Single,再把想打在一张大图里的碎图指定为相同的Packing Tag,将来就会自动合并了。如果想预览,可以打开菜单->Window->S... 阅读全文

posted @ 2015-08-07 13:06 wantnon 阅读(780) 评论(0) 推荐(0)

2015年8月6日

unity, audio falloff

摘要: 要达到声音随距离衰减的效果,需要使用3D音效,即把Spatial Blend设为1,然后再调节Min Distance和Max Distance(蓝色线框球体),并选择合适的Volume Rolloff模型。另外,unity默认把listener组件加在了camera上,而对于第三人称游戏,将lis... 阅读全文

posted @ 2015-08-06 17:11 wantnon 阅读(305) 评论(0) 推荐(0)

photoshop,用切片工具等分图片

摘要: 一,切片二,导出:菜单->文件->存储为Web和设备所用格式将预设改为PNG-24,然后点存储。 阅读全文

posted @ 2015-08-06 16:56 wantnon 阅读(583) 评论(0) 推荐(0)

2015年7月31日

unity, 在保持场景根节点Transform不变且Hierarchy结构不变的前提下整体旋转场景

摘要: 比如我们摆出下面结构:其Hierarchy如下:其中根节点road的Transform是如下干净的原始状态:现在想保持road的Hierarchy和Transform都不变的情况下将road旋转90度。也就是说想把对road的旋转下放到子节点,当然,这样每个子节点就不止需要旋转还需要平移。一个比较取... 阅读全文

posted @ 2015-07-31 12:32 wantnon 阅读(1318) 评论(0) 推荐(0)

四,失联

摘要: 返回目录:http://www.cnblogs.com/wantnon/p/4649254.htmlyc走出公司,穿过商场去地铁(这是去地铁的一条近路)。他穿了一件黑色T恤和黑色短裤,手里拎着黑色电脑包,走在各种奢侈品琳琅满目、时刻有美女擦肩而过的高档商场里,显得与环境非常不搭。走到电梯口时,一个穿... 阅读全文

posted @ 2015-07-31 00:27 wantnon 阅读(227) 评论(0) 推荐(0)

2015年7月30日

unity, setting standard shader by script

摘要: http://forum.unity3d.com/threads/change-standard-shader-render-mode-in-runtime.318815/ 阅读全文

posted @ 2015-07-30 15:48 wantnon 阅读(280) 评论(0) 推荐(0)

unity, surface shader access world position and localposition

摘要: 一,surface shader中访问worldposition在surface shader中访问世界坐标,只需在Input结构体中声明float3 worldPos即可,如下: structInput{float2uv_MainTex;float3worldPos;};voidsurf(In... 阅读全文

posted @ 2015-07-30 14:41 wantnon 阅读(1662) 评论(0) 推荐(0)

上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 43 下一页

导航