zoukankan      html  css  js  c++  java
  • 2017年5月

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

    K.S.Framework Documention http://mr-kelly.github.io/KSFramework/

    SLua http://www.slua.net/

    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)

  • 相关阅读:
    支付宝及时到帐接口使用详解
    简便无刷新文件上传系统
    EyesBaby功能实现之窗口拖拽与缩放功能
    Jquery各行换色 click变色
    纯CSS圆角框3-圆角化图片
    WINFORM自定义皮肤制作(上)
    EyesBaby1.0使用帮助文档
    C#实现小写金额转大写金额
    在winform中运用FusionCharts图表(一)
    第一章、基本的圆角框
  • 原文地址:https://www.cnblogs.com/revoid/p/6794859.html
Copyright © 2011-2022 走看看