Unity2D Keynote

1、File Format Accepted by Unity

2、By double-clicking an object in Hierachy, you not only select the object in the scene but center the viewport on it for a better view.

3、You could select the cube and press Ctrl+D on the keyboard to replicate an object. 在组件面板右键弹出的选项面板,可以复制与粘贴组件属性。

4、By holding the V key while translating you can snap an object to vertices, which is great for fast, precision aligning.

按住V键,可以实现顶点对齐,先选中当前object顶点,再选中目标顶点,当前object即会贴在目标object上。

5、Window->Profiler选项可以打开Profiler面板,用于监视程序运行时的各项指标。

6、Changes to the material (such as changes in color) will be propagated and applied to all associated meshes.

7、Layers are most commonly used by Cameras to render only a part of the scene, and by Lights to illuminate only parts of the scene. Layers is a uint32 which means at most 32 layers can be defined.

  下图是设置Camera只显示某些Layer的截图,Light设置的图如右下:

8、 Using layers you can cast rays and ignore colliders in specific layers. For example you might want to cast a ray only against the player layer and ignore all other colliders.

 // JavaScript example.

 // bit shift the index of the layer to get a bit mask
var layerMask = << ;
// Does the ray intersect any objects which are in the player layer.
if (Physics.Raycast (transform.position, Vector3.forward, Mathf.Infinity, layerMask))
print ("The ray hit the player"); // C# example. int layerMask = << ; // Does the ray intersect any objects which are in the player layer.
if (Physics.Raycast(transform.position, Vector3.forward, Mathf.Infinity, layerMask))
Debug.Log("The ray hit the player");

9、Layer-Based Collision Detection

  In Unity 3.x we introduce Layer-Based collision detection, which is a way to make Game Objects collide with another specific Game Objects that are tied up to specific layers.In order to edit collision matrix, choose Edit->Project Settings->Physics.

  

10、Sorting Layer & Order In Layer

  Unity uses the concept of sorting layers to allow you to divide sprites into groups for overlay priority. Sprites with a sorting layer lower in the order will be overlaid by those in a higher sorting layer. Sometimes, two or more objects in the same sorting layer can overlap (eg, two player characters in a side scrolling game). The order in layer property can be used to apply consistent priorities to sprites in the same layer. As with sorting layers, the rule is that lower numbers are rendered first and can be obscured by the higher numbers rendered later.

最新文章

  1. 第 31 章 项目实战-PC端固定布局[2]
  2. R语言解读一元线性回归模型
  3. .net生成随机字符串
  4. FT232RL变砖之后
  5. Saltstack-初体验
  6. POJ 2140 Herd Sums
  7. JAVA 跑马灯文字效果
  8. 持续集成篇-- SonarQube代码质量管理平台的安装
  9. select into
  10. ORACLE的锁机制
  11. JAVA_SE基础——5.第一个Java程序HelloWorld&注释的应用
  12. Docker学习笔记【四】Docker 仓库
  13. webveiw返回死循环问题以及在打开web页面会唤起浏览器打开的问题解决
  14. nrm 安装与使用
  15. 使用com.aspose.words将word模板转为PDF乱码解决方案(window下正常)
  16. 【MOOC EXP】Linux内核分析实验八报告
  17. Python:多线程
  18. 科学-建筑学-事务所:KPF
  19. C#数组 添加元素
  20. Linux基础命令---zip

热门文章

  1. PHP学习笔记04——数组
  2. 关于ios越狱开发的那些事
  3. 【英语】Bingo口语笔记(29) - Run系列
  4. JVM——垃圾收集算法
  5. 关于iOS APP中网络层的设计
  6. 用xsd验证xml
  7. cong
  8. ArcGIS Engine栅格数据使用总结
  9. 怎样预防Ddos攻击
  10. HDU5804 Price List (BestCoder Round #86 A)水题