- 博客(20)
- 资源 (2)
- 收藏
- 关注
原创 减少unity包大小
官方文档:https://docs.unity3d.com/Manual/ReducingFilesize.html主要点有:1、build包之后,在windows-console打开的右上角打开EditorLog,可以查看各种资源的占比和单文件大小排序,方便选择优化目标。2、打包时资源都是压缩成内部类型,ps类型图片和png最终区别并不大。3、不用的资源unity会自动摒弃,除了
2017-02-06 15:05:14
1457
原创 Windows、Unix、Mac不同操作系统的换行问题 回车符\r和换行符\n
一、概念:换行符‘\n’和回车符‘\r’(1)换行符就是另起一行 --- '\n' 10 换行(newline)(2)回车符就是回到一行的开头 --- '\r' 13 回车(return)所以我们平时编写文件的回车符应该确切来说叫做回车换行符 CR: 回车(Carriage Return) \rLF: 换行(Line Feed) \n二、应用:(1)在微
2016-10-12 12:11:29
16308
原创 Unity3d 鼠标的事件GetMouseButtonDown()、GetMouseButton()、GetMouseButtonUp()
http://blog.csdn.net/a350203223/article/details/41018983当鼠标按键按下时,返回一次true,后面参数0是左键,1是右键,2是中键 if(Input.GetMouseButtonDown(0)) Debug.Log("Pressed left click."); if(Input.GetMouseButtonDown(1))
2016-06-24 17:01:17
1645
原创 UnityException: Input Key named: Fire1 is unknown
原来代码里if(Input.GetKeyDown(KeyCode.D))或者if(Input.GetKeyDown(“d”))后来在Input Manager配置了虚拟轴,以Fire1为例,if(Input.GetKeyDown(“Fire1”))。结果出现了UnityException: Input Key named: Fire1 is unknown UnityEngine.I
2016-02-24 14:33:30
4306
原创 PlayerPrefs在android的存放位置
apk安装在内置flash存储器上时,PlayerPrefs的位置是\data\data\com.company.product\shared_prefs\com.company.product.xmlapk安装在内置SD卡存储器上时,PlayerPrefs的位置是/sdcard/Android/data/com.company.product\shared_prefs
2016-02-01 17:41:39
12239
原创 newline in constant error
unity 中报错newline in constant error:源文件中有中文字符串,将源文件用记事本打开另存为utf-8格式。
2015-12-03 17:37:24
871
转载 操作系统Unix、Windows、Mac OS、Linux的故事
http://www.jb51.net/os/other/159236.html我们熟知的操作系统大概都是windows系列,近年来Apple的成功,让MacOS也逐渐走进普通用户。在服务器领域,恐怕Linux是无人不知无人不晓。他们都是操作系统,也在自己的领域里独领风骚。这都还得益于另外一个古董级别的操作系统--Unix,虽然说古董级别,只是他年纪大了,性能和功能,Unix依然有着顽强的
2015-11-19 11:37:44
19300
3
转载 五种开源协议(GPL,LGPL,BSD,MIT,Apache)
原文地址http://www.oschina.net/question/54100_9455什么是许可协议?什么是许可,当你为你的产品签发许可,你是在出让自己的权利,不过,你仍然拥有版权和专利(如果申请了的话),许可的目的是,向使用你产品的人提供 一定的权限。不管产品是免费向公众分发,还是出售,制定一份许可协议非常有用,否则,对于前者,你相当于放弃了自己所有
2015-11-19 10:28:56
688
原创 Quaternion.Slerp
Quaternion.Slerpstatic Quaternion Slerp(Quaternion from, Quaternion to, float t);DescriptionSpherically interpolates between from and to by t.从from到to在t位置的球状插值using Uni
2015-11-06 18:38:52
2376
翻译 unity实例化预设
Instantiating Prefabs at runtimeBy this point you should understand the concept of Prefabs at a fundamental level. They are a collection of predefined GameObjects &Components that are re-usa
2015-09-10 13:29:17
6265
翻译 Unity3d input axis
Conventional Game InputUnity supports keyboard, joystick and gamepad input.Virtual axes and buttons can be created in the Input Manager, and end users can configure Keyboard input in a nic
2015-09-06 11:23:06
3099
转载 ARM 指令集版本和ARM 版本
原文地址:http://www.cnblogs.com/loleng/archive/2011/06/14/2080447.html常常能看到ARM7,ARM9,ARM11,以及armv6k等不同的表达。且在GCC编译中,常常要用到 -march, -mcpu等。他们分别表达什么涵义呢?Sam自己也不很清楚,只是大概有个模糊的概念。今天就仔细研究一下。ARM(Advanced
2015-08-31 13:32:13
654
翻译 Unity 特殊文件夹
Special Folder NamesFor the most part, you can choose any names you like for the folders you create to organise your project. However, there are a number of folder names that Unity will interp
2015-08-31 11:11:28
1188
原创 tips
1、1个二进制位称为1个bit,8个二进制位称为1个Byte,也就是1个字节(8位)字:就是在CPU内部传输,处理,暂时存放的最大数据大小,注意,是在CPU内部。 在16位CPU(8086就是这种CPU)中,一字表示16位(2字节),双字代表32位(4字节)。 在32位CPU中,一字表示32位(4字节),双字表示64位(8字节)。 在64位CPU中,一字表示64位(8字
2015-08-28 10:07:04
607
原创 u3d小知识记录
Transform.forward 向前The blue axis of the transform in world space.在世界空间坐标变换的蓝色轴。也就是z轴。就是物体在局部坐标系的z轴在世界坐标系中的值,而而Vector3.forward只不过是(0, 0, 1)的缩写using UnityEngine;using System.Collectio
2015-08-27 20:33:13
692
原创 StaticBatchingUtility.Combine静态物体合并
static void Combine(GameObject staticBatchRoot);DescriptionCombine will prepare all children of the staticBatchRoot for static batching.Once combined children can NOT change thei
2015-08-27 17:07:16
5180
转载 unity3d定时器
1、利用Update();适合重复调用public float timer = 1.0f;// Update is called once per framevoid Update() { timer -= Time.deltaTime; if (timer timer = 1.0f; }}2、利用协程;void Sta
2015-08-27 14:11:17
606
原创 Unity3d打包android apk
需要jdk,androidSdk,本文使用的jdk-8u25-windows-i586和adt-bundle-windows-x86_64-20140702。第一次发布Android 提示select android sdk root folder,选择adt-bundle-windows-x86_64-20140702\sdk文件夹。报错Minimum platform required f
2015-04-02 14:51:39
2001
原创 开博首篇
我从事软件开发以来,从各位前辈博客学到了很多知识,也解决了很多问题。个人的精力和时间是有限的,不能每个方面都可以细细地研读书籍,而不同的人专长的领域不同,知识的分享就可以弥补个人之不足,从而节约所有人的时间。在现实中有价值的资源,唯独知识分享后不会减少,互联网的普及又减少了分享的成本,所以对于渴望知识的人来说,当今真是一个好的时代。分享是个人创造的价值,所以应该尊重原创者。我写博客一是为在学习中有
2014-12-09 11:44:43
360
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人