博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
2017年5月
阅读量:5806 次
发布时间:2019-06-18

本文共 5450 字,大约阅读时间需要 18 分钟。

The “Standalone” platform refers to builds for Mac, Windows and Linux.

 

K.S.Framework Documention 

 

SLua 

 

Transform.Find == Transform.FindChild(deprecated)

 

The Canvas is the area that all UI elements should be inside. The Canvas is a Game Object with a Canvas component on it, and all UI elements must be children of such a Canvas.

 

Canvas uses the EventSystem object to help the Messaging System.

 

UI elements in the Canvas are drawn in the same order they appear in the Hierarchy. The first child is drawn first, the second child next, and so on. If two UI elements overlap, the later one will appear on top of the earlier one.

 

The Rect Transform is a new transform component that is used for all UI elements instead of the regular Transform component.

 

Rect Transforms have position, rotation, and scale just like regular Transforms, but it also has a width and height, used to specify the dimensions of the rectangle.

 

When the Rect Tool is used to change the size of an object, normally for Sprites in the 2D system and for 3D objects it will change the local scale of the object. However, when it’s used on an object with a Rect Transform on it, it will instead change the width and the height, keeping the local scale unchanged. This resizing will not affect font sizes, border on sliced images, and so on.

 

If the parent of a Rect Transform is also a Rect Transform, the child Rect Transform can be anchored to the parent Rect Transform in various ways.

 

The positions of the anchors are defined in fractions (or percentages) of the parent rectangle width and height. 0.0 (0%) corresponds to the left or bottom side, 0.5 (50%) to the middle, and 1.0 (100%) to the right or top side. But anchors are not limited to the sides and middle; they can be anchored to any point within the parent rectangle.

 

Anchor and position fields in the Inspector

You can click the Anchors expansion arrow to reveal the anchor number fields if they are not already visible. Anchor Min corresponds to the lower left anchor handle in the Scene View, and Anchor Max corresponds to the upper right handle.

The position fields of rectangle are shown differently depending on whether the anchors are together (which produces a fixed width and height) or separated (which causes the rectangle to stretch together with the parent rectangle).

When all the anchor handles are together the fields displayed are Pos X, Pos Y, Width and Height. The Pos X and Pos Y values indicate the position of the pivot relative to the anchors.

When the anchors are separated the fields can change partially or completely to Left, Right, Top and Bottom. These fields define the padding inside the rectangle defined by the anchors. The Left and Right fields are used if the anchors are separated horizontally and the Top and Bottom fields are used if they are separated vertically.

Note that changing the values in the anchor or pivot fields will normally counter-adjust the positioning values in order to make the rectangle stay in place. If cases where this is not desired, the Raw Mode can be enabled using a small button in the Inspector. This causes the anchor and pivot value to be able to be changed without any other values changing as a result. This will likely cause the rectangle to be visually moved or resized, since its position and size is dependent on the anchor and pivot values.

 

Images can be imported as UI sprites by selecting Sprite( 2D / UI) from the ‘Texture Type’ settings. Sprites have extra import settings compared to the old GUI sprites, the biggest difference is the addition of the sprite editor. The sprite editor provides the option of 9-slicing the image, this splits the image into 9 areas so that if the sprite is resized the corners are not stretched or distorted.

 

The interaction components are not visible on their own, and must be combined with one or more visual elements in order to work correctly.

 

Most of the interaction components have some things in common. They are selectables, which means they have shared built-in functionality for visualising transitions between states (normal, highlighted, pressed, disabled), and for navigation to other selectables using keyboard or controller. This shared functionality is described on the Selectable page.

 

1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 using System.Runtime.InteropServices; 7  8 namespace ConsoleApp1 { 9     class Program {10         static unsafe void Main(string[] args) {11             int i;12             object o = new Blittable();13 14             int* ptr = &i;15 16             IntPtr address = (IntPtr)ptr;17 18             Console.WriteLine(address.ToString("x"));19 20             GCHandle h = GCHandle.Alloc(o, GCHandleType.Pinned);21             address = h.AddrOfPinnedObject();22             Console.WriteLine(address.ToString("x"));23 24             h.Free();25 26 27         }28     }29 30     [StructLayout(LayoutKind.Sequential)]31     class Blittable {32         int x;33     }34 }

 

C# 枚举,接口的默认访问修饰符是 public

Update中使用Queue的作用是保证每帧只执行一个队列中的一个任务,提高稳定性?

接口规范行为

casual games 休闲游戏

Camera.WorldToScreenPoint 将世界坐标转换为屏幕坐标

Camera.aspect = width/height, width = Camera.aspect * height

Unity中保存引用最好用Transform而不是GameObject?

return break continue

 

Ctrl + M + O: 折叠所有方法

Ctrl + M + M: 折叠或者展开当前方法

Ctrl + M + L: 展开所有方法

 POT(power of two),NPOT(non power of two)

转载于:https://www.cnblogs.com/revoid/p/6794859.html

你可能感兴趣的文章
如何在python中import
查看>>
[Qt][翻译]Qt Style Sheets内容学习-1
查看>>
FusionCharts中文教程:自定义图表——锚点
查看>>
zhilizhili-ui 2016始动 移动端select美化
查看>>
常用浏览器私有属性小记
查看>>
CSS3实现气泡效果
查看>>
大数据平台CDH集群在线安装
查看>>
[Leetcode] Sliding Window Maximum 滑动窗口最大值
查看>>
滚蛋吧!constant 君
查看>>
swift 中级extension
查看>>
简单几步在 Windows 10 上尝鲜 Chrome 的黑暗模式
查看>>
einx 1.0 发布,golang 游戏服务器框架
查看>>
Adaptive Execution如何让Spark SQL更高效更好用?
查看>>
全栈必备——Git
查看>>
git 操作
查看>>
深入理解 JavaScript中的变量、值、传参
查看>>
AECC2019免费下载After Effects CC 2019中文完整破解版免费下载与安装教程 ...
查看>>
2018再见|2019你好
查看>>
混合云管理-企业如何选择混合云管理平台
查看>>
基于Spark的机器学习实践 (十) - 降维
查看>>