当前位置:网站首页>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
边栏推荐
- General test technology [II] test method
- C-11 problem h: treasure chest 2
- General testing technology [1] classification of testing
- LoadRunner - performance testing tool
- The most understandable life cycle of dependency injection
- IOTOS物联中台对接海康安防平台(iSecure Center)门禁系统
- "Visual programming" test paper
- Detailed explanation of socket programming send() and recv() functions
- Can you answer the questions that cannot be answered with a monthly salary of 10k-20k?
- Mysql database, inconsistent index character set, slow SQL query, interface timeout
猜你喜欢
Visual programming -- how to customize the mouse cursor
Visual programming - Experiment 1
Experiment 5 components and event handling
Data mining series (3)_ Data mining plug-in for Excel_ Estimation analysis
The most understandable life cycle of dependency injection
QT learning summary
General test technology [II] test method
2022 团体程序设计天梯赛 模拟赛 L2-4 哲哲打游戏 (25 分)
2022g2 boiler stoker examination question bank and online simulation examination
How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
随机推荐
Problem a: face recognition
Idempotency practice operation, explaining idempotency based on business
. net webapi access authorization mechanism and process design (header token + redis)
Supersocket is Use in net5 - concept
《C语言程序设计》(谭浩强第五版) 第7章 用函数实现模块化程序设计 习题解析与答案
Scenario Title: how does system a use the page of system B
Can you answer the questions that cannot be answered with a monthly salary of 10k-20k?
A comprehensive understanding of static code analysis
Configuration table and page information automatically generate curd operation page
可以接收多種數據類型參數——可變參數
Comprehensive calculation of employee information
[Mysql] LEFT函数 | RIGHT函数
Node configuration environment CMD does not take effect
Visual programming - drawing assignment
poi根据数据创建导出excel
This new feature of C 11, I would like to call it the strongest!
The website JS in. Net core cefsharp chromium WebBrowser calls the C method in winfrom program
2022年做跨境电商五大技巧小分享
IDEA查看历史记录【文件历史和项目历史】
Chapter 9 of C language programming (fifth edition of Tan Haoqiang) analysis and answer of exercises for users to establish their own data types