位置: 编程技术 - 正文

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灯光烘培)

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

  • 怎么交税费
  • 个人所得税抵扣项目有哪些及金额
  • 私车公用去税务局开什么发票
  • acca b/f
  • 厂部管理人员薪酬计入什么费用
  • 所得税申报表营业成本填什么数据
  • 实收资本印花税税率多少
  • 建筑业预缴税款都要填哪些表
  • 生产中的原料回收如何做会计帐务处理?
  • 钱汇错需要退回应该怎么做分录?
  • 跨月发票作废怎么操作流程
  • 出售使用过的固定资产如何开票 备注
  • 减免税款期末有余额吗
  • 南方建筑主编
  • 客户方流水号是什么
  • 一般纳税人如何纳税申报
  • 加权平均净资产收益率等于企业净利润除以
  • 资产负债表日后事项是什么意思?
  • 成本少结转了怎么调账
  • 注册资本需要缴清吗
  • 归还法人前期垫付款项
  • 房地产企业人防工程计入什么科目
  • 打方向咯噔一声已解决
  • bios boot设置
  • Win10 Build 19044.1288累积更新补丁KB5006670(附更新修复内容汇总)
  • 怀特岛郡国旗
  • 什么是集成显卡长什么样
  • 本月购买原材料怎么入账
  • 父子之间房屋赠与费用
  • 销售折扣属于什么项目
  • php7.3安装
  • php日期差
  • php linux 环境搭建
  • 审稿意见范例
  • 利息资本化怎么计算
  • python读书笔记
  • yolov5结构解析
  • JavaScript の querySelector 使用说明
  • 成本分配明细表
  • 织梦模板官网
  • 施工企业的内部往来
  • 收到天使投资账务处理
  • mysql日期和时间分开存的 索引
  • sql server 递归
  • 个人劳务费免增值税吗
  • 印花税计入税金及附加科目吗
  • 车保险费中的车费是什么
  • 给客户优惠货款怎么写
  • 企业项目的特点
  • 怎么开公司的微信公众号
  • 预付和挂账如何区分
  • 应交增值税借贷方发生额表示
  • 手机发票计入什么科目
  • 五证合一的办理流程是什么
  • 高新企业认定条件2022上海
  • u盘装win7系统步骤
  • guest怎么用
  • centos安装软件教程
  • linux中awk怎么用
  • centos6.5双网卡绑定
  • windows7使用
  • win10 20h2怎么更新
  • 如何使用u盘安装linux
  • 在ubuntu上安装apache
  • linux怎么修改主配置文件
  • jquery左滑切换
  • js时间计算相减
  • easyui multiple
  • eclipse从本地导入项目
  • javascript函数用法
  • it unes
  • javascript获取当前文件夹文件数量
  • keycode输入cat
  • jquery删除dom
  • 安卓 触摸屏
  • 烟草什么品牌好
  • 国税稽查局查账单凭个人流水能不能当做证据
  • 重庆国税税务局官网
  • 环保信用评价等级分级情况
  • 淄博市地方税务局
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设