当前位置:网站首页>Unity knowledge points (ugui)
Unity knowledge points (ugui)
2022-04-23 03:22:00 【C # primary advanced】

One : Use Canvas when EventSystem( system event ) Hui He Canvas Come together 
1.Screen Space - Overlay( Screen space - Cover )
This rendering mode represents Canvas All under UI Control is always in front of the screen , With or without a camera , UI The element is always at the front of the screen , Mainly 2D effect . Similar to the mobile phone film pasted on the top of the mobile phone screen , If the screen size or screen resolution changes ,Canvas It will also automatically adapt to the current screen size , This solves the problem of screen adaptation .

2. Screen Space - Camera( Camera space )
This rendering mode Canvas and There is a certain distance between the cameras , It can be on the camera and Canvas Play some particle effects between , Mainly 3D effect . When using this rendering mode, you need to set up a camera and bind it to Canvas Under components Rander Camera It's about , change Camera be UI The rendering effect of elements will also change .

plus:
Check "Pixel Perfect", stay Canvas The blur effect in disappears , Become relatively clear .

3. World Space( World space )
In this mode Canvas Just like the ordinary 3D The object is the same , You can control its size , rotate , Zoom, etc . This rendering mode makes UI Elements and 3D Objects in the world produce occlusion effects . Usually used to make blood strips .

Constant Pixer Size —— Constant pixel

In this mode UI In pixels , The same pixels have different sizes at different resolutions
Scale With Screen Size —— Screen size scale 
In this zoom mode UI The position is adjusted according to the resolution of the screen and the set aspect ratio UI The location of , Usually do screen UI You need to adjust to this zoom mode when adapting .
Constant Physical Size —— Constant size

In this mode UI In pixels , The size is different at different resolutions
Graphic Raycaster: Control whether to let UI Response ray click

EventStystem 
Two :Text

Four side anchor

3、 ... and :Panel
panel Control is also called panel , The panel is actually a container , You can put other... On it UI Control .
When you move the panel , What's in it UI Control will follow , In this way, a group of controls can be moved and handled more reasonably and conveniently .
Drag the 4 A corner or 4 The edges adjust the size of the panel .
A fully functional UI Interfaces tend to use multiple Panel Container controls , There's another panel in the case , As shown in the figure below .
When you create a panel , This panel will contain one by default Image(Script) Components , As shown in the figure below .
among ,Source Image The image used to set the panel ,Color Used to change the color of the panel .
Four :Image

Source Image( Image source ): The texture format is Sprite(2D and UI) Picture resources of ( After importing the picture, select Texture Type by Sprite(2D and UI)).
Color( Color ): Picture overlay color .
Material( texture of material ): Picture overlay material .
Raycast Target( Ray projection target ): Whether to be a ray projection target .
Image Type( Picture display type ):Simple( Basic ), The whole picture shows , No cutting , Don't stack , Depending on the size of the border, there will be stretching .
Preserve Aspect( Lock the scale ): in the light of Simple Pattern , After the check , Whether the shape of the picture is enlarged or reduced , Will always maintain the initial length width ratio .
Image Type( Picture display type ):Sliced( sliced ), The picture slice shows , stay Project Select the picture on the page , Switch to a Sprite(2D and UI) After the model , Click on Sprite Editor Enter picture cutting mode , Cut the picture into the shape shown above , Use Sliced After the model , Stretch according to picture border , The four corners of the picture will remain the same , and 1 and 4 The part will stretch with the horizontal stretching of the picture ,2 and 3 The part will stretch with the longitudinal stretching of the picture , The middle part of the picture will stretch 5 Fill in .
Image Type( Picture display type ):Tiled( Tiled ), If the picture has been cut , Then use Tiled After the model , Stretch according to picture border , The four corners of the picture will remain the same , and 1 and 4 The part will stretch with the horizontal stretching of the picture ,2 and 3 The part will stretch with the longitudinal stretching of the picture , The middle part of the picture will use 5 Tile fill . If the picture is not cut , Then use Tiled After the model , Stretch according to picture border , Keep the original size of the picture unchanged , Just fill it with your own tiles .

Image Type( Picture display type ):Filled( Filled with ), According to the filling method 、 Fill starting point 、 The fill ratio determines which part of the picture is displayed .
Fill Method( fill style ): Divided into levels 、 vertical 、90 Degree circle 、180 Degree circle 、360 Degree circle .
Fill Origin( Fill starting point ): It varies according to the filling method .
Fill Amount( Fill ratio ):0 It doesn't show at all ,1 Is a complete display .
5、 ... and :Raw Image

6、 ... and :Input Field

版权声明
本文为[C # primary advanced]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220621093587.html
边栏推荐
- 批量下载文件----压缩后再下载
- TCP three handshakes and four waves
- 2022年做跨境电商五大技巧小分享
- Top ten project management software similar to JIRA
- EasyUI's combobox implements three-level query
- 2022a special equipment related management (elevator) work license question bank and simulation examination
- General testing technology [1] classification of testing
- 《C语言程序设计》(谭浩强第五版) 第8章 善于利用指针 习题解析与答案
- Generate QR code through zxing
- C introduction of variable parameter params
猜你喜欢

Course design of Database Principle -- material distribution management system

Visual programming -- how to customize the mouse cursor

. net webapi access authorization mechanism and process design (header token + redis)

一套组合拳,打造一款 IDEA 护眼方案

全新的ORM框架——BeetlSQL介绍

Configure automatic implementation of curd projects

Explanation keyword of MySQL

xutils3修改了我提报的一个bug,开心

Quartz. Www. 18fu Used in net core

Utgard connection opcserver reported an error caused by: org jinterop. dcom. common. JIRuntimeException: Access is denied. [0x800
随机推荐
《C语言程序设计》(谭浩强第五版) 第9章 用户自己建立数据类型 习题解析与答案
C abstract class
Super easy to use asynchronous export function of Excel
be based on. NETCORE development blog project starblog - (2) environment preparation and creation project
It can receive multiple data type parameters - variable parameters
[untitled]
. NETCORE sets the API post mode, which can accept parameters directly in parentheses
Visual programming - Experiment 2
Node configuration environment CMD does not take effect
Téléchargement en vrac de fichiers - téléchargement après compression
Chapter 8 of C language programming (fifth edition of Tan Haoqiang) is good at using pointer exercises to analyze and answer
2022 团体程序设计天梯赛 模拟赛 L2-4 哲哲打游戏 (25 分)
“如何实现集中管理、灵活高效的CI/CD”在线研讨会精彩内容分享
关于idea调试模式下启动特别慢的优化
Top 9 task management system in 2022
Visual programming - Experiment 1
AWS from entry to actual combat: creating accounts
Charles uses three ways to modify requests and responses
MySQL installation pit
String input problem