12 2015 档案

unity, StopAllCoroutines导致bug的解决办法
摘要:StopAllCoroutines有时候不用不行。但只要一用,就可能导致无穷无尽的bug。原因是StopAllCoroutines会将当前脚本中所有coroutines都停掉,而没法做到只停掉我们想停的那一部分coroutines。解决办法是:用多个脚本。把一组想一停全停的一组coroutines放... 阅读全文

posted @ 2015-12-28 01:01 wantnon 阅读(1715) 评论(0) 推荐(0) 编辑

unity, 删除animationEvent
摘要:当初给Player的一个animation加了个animationEvent,后来与之关联的响应函数删除了,于是导致报错:‘Player’ AnimationEvent ‘idleHalfEvent’ has no receiver! Are you missing a component?接下来是... 阅读全文

posted @ 2015-12-24 22:37 wantnon 阅读(2954) 评论(0) 推荐(0) 编辑

unity, unity中GL.MultMatrix的一个超级bug
摘要:GL.MultMatrix与OpenGL固定管线的glMultMatrix函数行为并不一致,不是累乘,而是覆盖。例如下面例子,本来预期是在(100,100)处画一个方块,而实际效果却是在(0,0)处画一个方块:GL.PushMatrix();GL.LoadPixelMatrix();{//mult ... 阅读全文

posted @ 2015-12-22 11:58 wantnon 阅读(676) 评论(0) 推荐(0) 编辑

unity, TRANSFORM_TEX
摘要:TRANSFORM_TEX在UnityCG.cginc中定义。----补充:为啥buildin shader Unlit-Normal.shader中有一个float4 _MainTex_ST变量,现在就明白了,因为o.texcoord = TRANSFORM_TEX(v.texcoord, _Ma... 阅读全文

posted @ 2015-12-14 14:14 wantnon 阅读(1528) 评论(0) 推荐(0) 编辑

unity, access scene ambient
摘要:lighting面板里设置的ambient color,在shader里访问是通过UNITY_LIGHTMODEL_AMBIENT这个变量。它定义在UnityShaderVariables.cginc里。参考:http://docs.unity3d.com/410/Documentation/Com... 阅读全文

posted @ 2015-12-14 14:11 wantnon 阅读(291) 评论(0) 推荐(0) 编辑

oblique perspective projection
摘要:参考: https://en.wikibooks.org/wiki/GLSL_Programming/Vertex_Transformations 《3D游戏与计算机图形学中的数学方法》Eric Lengyel 阅读全文

posted @ 2015-12-11 01:35 wantnon 阅读(295) 评论(0) 推荐(0) 编辑

unity,set ugui rectTransform anchor by script
摘要:如果想用代码实现与下面面板相同的功能试验可知改变上面选项下面四个值也随之变化:所以说明二者是一回事儿。因此,只要通过代码修改RectTransform的anchorMax和anchorMin成员即可。 阅读全文

posted @ 2015-12-11 00:35 wantnon 阅读(428) 评论(0) 推荐(0) 编辑

Adreno Profiler连接安卓手机profile第三方app渲染过程
摘要:1,下载Android SDK,adb在Android SDK/platform-tools下。2,添加adb环境变量:http://www.cnblogs.com/xwlyun/archive/2012/11/29/2794415.html3,查看安卓手机是否连上了电脑:在cmd里输入命令adb ... 阅读全文

posted @ 2015-12-07 16:22 wantnon 阅读(1128) 评论(0) 推荐(1) 编辑

纹理mag filter不能取GL_XXX_MIPMAP_XXXX
摘要:今天遇到OpenGL error 0x0500错误,定位到glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magFilter);查看magFilter的值,传的是GL_LINEAR_MIPMAP_NEAREST一开始不解,后来明白了,因为m... 阅读全文

posted @ 2015-12-06 20:42 wantnon 阅读(479) 评论(0) 推荐(0) 编辑

(转)No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VA 解决办法
摘要:c3dEngine在iphone6模拟器下运行报错No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VA使用下面方法中的第3条解决了问题:转自:http://my.oschina.net/u/12446... 阅读全文

posted @ 2015-12-06 18:57 wantnon 阅读(1345) 评论(0) 推荐(0) 编辑

git 清除历史
摘要:http://stackoverflow.com/questions/9683279/make-the-current-commit-the-only-initial-commit-in-a-git-repository http://user.qzone.qq.com/350479720/blog 阅读全文

posted @ 2015-12-06 12:55 wantnon 阅读(148) 评论(0) 推荐(0) 编辑

IDirect3DDevice9::SetTexture的stage参数
摘要:HRESULT IDirect3DDevice9::SetTexture(DWORD Stage, IDirect3DBaseTexture9 *pTexture)其中Stage并不是“阶段”的意思,而是“通道”的意思,即纹理挂接点,取值范围0~7。参考:https://msdn.microsoft... 阅读全文

posted @ 2015-12-02 16:13 wantnon 阅读(402) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示