Unity 【Beginner_UI Components】

unity UI 个人学习笔记

官网教程UI Components
Tutorial & Beginner

一. Button

Properties

1.inter-actable (决定是否可交互)

2.transition(过渡)包含color tint , sprite swap , animation三种,每类具体功能尝试即可知

其中color tint中Color multiplier会将比如Pressed 和Selected的颜色混起来,(意义不明),Fade Duration就是颜色转变的速度拉

而Animation功能强大,可点击下方按钮自动生成所需Animator组件,实现如Highlighted时改变button的width
在这里插入图片描述在这里插入图片描述

if several buttons share the same behaviour ,these button elements can share animator controllers
在这里插入图片描述

3.navigation(导航)
navigation is shared by many UI elements and will be covered in it’s own lesson.

4.在Canvas生成时会同时生成EventSystem ,
when event system detects a press and a release over the same button element, the event system will process a click and the On Click event will be called.

//On Click functions list 是built-in(内置)的

//plus icon & minus icon(加减号)

Associating a game object with the object field will allow the event system to find all the functions on that game object eligible to be called by the On Click event.(所以说On Click的功能是找某个“game object”上的“component”,再从component找到要的“function”)。
The function list shows all of the components on the game object, including both the built-in components and custom scripts;
After selecting the desired component a new list shows the eligible f

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值