位置: 编程技术 - 正文

CustomPropertyDrawer-Change the height of Property field

编辑:rootadmin

推荐整理分享CustomPropertyDrawer-Change the height of Property field,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

The last blog post didn't cover a certain nifty method in PropertyDrawer, which is the GetPropertyHeight.

GetPropertyHeight: Determines the height in pixel of the property field.

Overriding GetPropertyHeight therefore allows you to determine the height of your property field, instead of using the default property height.

The following examples shows how you can use GetPropertyHeight. I'll be using the WeaponType enum to determine weapon type on a character as an example. Every example will add/modify the behaviour of the Example 1.

Example 1:

This example shows our base for drawing an enum popup. This is also the default Unity behaviour.

Example 2:

Next we adjust the height of our property field, such that we can add a catch phrase to our weapon type.

CustomPropertyDrawer-Change the height of Property field

Example 3:

Lastly, we modify the height given WeaponType such that only Bazooka has a catch phrase.

When to use?

The first usage is when you need more space for your property drawer, which can be due to having a lot of fields that needs to be drawn.

The second reason could be because an object has different states. E.g. if we had the following Weapon class:

Splash radius might only be usable when having a bazooka, where as agun wouldn't need the splash damage field. We could then hide splash damage, when we have the type: Gun. This would also help the designers, since you could hide "useless" fields in certain states.

原文地址:

复习之增删改查 欢迎来到unity学习、unity培训、unity企业培训教育专区,这里有很多U3D资源、U3D培训视频U3D教程、U3D常见问题、U3D项目源码,我们致力于打造业内unity3d培

飞机大战之GUI设置 unity学习,希望我的博客能给喜欢unity的朋友带来帮助前几天我们讲了飞机大战,但是界面设置却不完整,缺少文字提示等内容,接下来我们就用GUI来实

数据库多表连接 我今天学习了数据库的多表连j接,分别有内连接和左外连接还有右外连接,这三个连接是最基本的连接。1.内连接分为是三种:等连接是指表之间通过等

标签: CustomPropertyDrawer-Change the height of Property field

本文链接地址:https://www.jiuchutong.com/biancheng/377325.html 转载请保留说明!

上一篇:Unity光照烘焙后,在PC上曝光,发布移动平台正常的解决方法(unity灯光烘培)

下一篇:复习之增删改查(增删改查的语句)

  • 税收会计在会计中的应用
  • 小规模纳税人的账务处理
  • 开专票还是开普发票
  • 什么时候过路费是半价
  • 银行理财算投资吗
  • 装水表财务是什么费用
  • 计提坏账准备的做法体现了什么的信息质量要求
  • 退货的增值税专用发票
  • 环保公司开具发票怎么开
  • 劳务报酬2019
  • 7月1日后通用机打发票纳税人识别号怎么填?
  • 员工福利费是否计入赔偿
  • 税法关于劳务费用的规定
  • 税控盘减免在哪里填报
  • 企业在开办期间发生的费用如何处理
  • 银行借款用于在建工程
  • 编制会计报表利润表
  • 房地产开发企业的土地使用权计入哪里
  • 我公司以房产土地为主
  • 修理厂年收入
  • 维护费抵减增值税的记账凭证
  • 月末是指
  • 资产负债表里的存货怎么算
  • 安卓系统详解
  • 快捷方式都变成pdf
  • 出卖固定资产企业处罚
  • 电脑cn是什么意思
  • nerosvc.exe - nerosvc是什么进程 有什么用
  • 应付职工薪酬账户期末余额可能是
  • 自产自销的苗木免税吗
  • 自己组装产品再卖掉
  • 注销报税是什么意思
  • 支票的提示付款期限为自出票日期
  • 用php开发app
  • 27岁零基础转行做网络工程师
  • 手机开的发票
  • 帐没做完怎么报增值税
  • 帝国cms修改提示怎么设置
  • 出资比例不等于100%
  • 个税哪种申报不用交个税的
  • 增值税纳税人放弃免税权的规定
  • 预开发票后涨价如何进行账务处理?
  • 税务登记证证书编号是什么
  • 预付账款是什么意思大白话
  • 提取折旧的意义
  • 工程结算在资产中的作用
  • 凭证必须用凭证盒
  • 实际报销金额
  • 暂估入库产品销售结转成本
  • 待处理财产损益会计分录
  • 进项税和销项税抵扣的会计分录
  • 如何做好企业安全生产工作
  • 怎样银行存款,预付帐款,应收帐款余额做资金平衡表
  • imac固态
  • mac有线不能上网
  • 用u盘重新装系统
  • win71
  • linux的head命令
  • 怎么在mac上看电视剧
  • 苹果官网
  • ssd安装centos7
  • linux开启samba服务
  • linux系统的内存分配和回收采用什么算法?
  • win8怎么设置
  • win10移动版应用商店打不开
  • rsync安装使用详解
  • 怎么检测端口通不通
  • 写出perl中最常见4种控制流
  • cocos2d教程
  • js写贪吃蛇什么水平
  • 不用js多浏览器能用吗
  • 基于JAVASCRIPT实现的可视化工具是
  • js如何创建类
  • js css函数
  • nodejs搭建本地资源服务器
  • javascript学习指南
  • python 面向对象 类
  • 粮食购销企业税收服务
  • 中国烟草一年税收占全国总收入
  • 重庆投诉平台电话
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设