位置: 编程技术 - 正文

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

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

  • 个人所得税退税操作流程
  • 小规模纳税人企业所得税计算
  • 本年利润是净利润还是利润总额
  • 车辆通行费属于政府性基金吗
  • 暂估库存商品比发票少1分怎么记账
  • 国际货运代理0税率和免税
  • 无偿赠送商品要纳企业所得税吗
  • 平行式明细账
  • 销售产品结转成本怎么算
  • 进项发票税点属于什么科目?
  • 工地运输费是什么费用
  • 民间非营利组织会计制度
  • 非货币性资产对外投资
  • 以前年度发生的费用
  • 税审计入什么科目?
  • 租金和物业费怎么计算
  • 本月暂估入库,下月
  • 现金支票工本费发票
  • 专票密码区出来一点能报吗
  • 资本公积转增资本什么意思
  • windows10如何重置密码
  • 企业所得税申报错误怎么更改
  • 出口报关单有什么用
  • 工人工资怎么算
  • 交易性金融资产属于流动资产
  • 新建vue项目
  • 解决安装后软件icon一圈白边问题
  • zend framework手册
  • 发票点击了打印,然后怎么修改
  • 不用财务软件的公司要去吗
  • php分页技术
  • jquery 兄弟选择器
  • c++图像二值化
  • 增值税专用发票和普通发票的区别
  • 固定资产加速折旧是什么意思
  • 清算时实收资本需要做收入吗为什么
  • 企业所得税的成本
  • 收到境外企业顾问费
  • 个人所得税表格怎么做
  • 深入浅出夏寒陆行全文免费阅读笔趣阁番外
  • win7安装软件时提示不能打开要写入的文件
  • 或有资产怎么处理
  • 存货是指企业在生产经营过程中为销售或耗用
  • 企业所得税的步骤
  • 增值税发票系统客服电话
  • 暂估和开票的差异 erp处理
  • 股权转让怎么入账
  • 个人所得税如果不补税会怎么样
  • 装饰设计 工程
  • 2021年财务报表申报
  • 劳务费收入交印花税吗
  • 账户分类的作用是什么
  • 固定资产的核算包括
  • 物流货到付款可以吗
  • 进项税额转出怎么操作
  • mysql replace正则表达式
  • mysql优化总结
  • sql修改表增加列
  • ubuntu复制文件到当前文件夹
  • unix操作指令
  • dll进程
  • win10系统锁屏后不弹出解锁界面
  • cpqdfwag.exe是什么进程 能结束吗 cpqdfwag进程查询
  • 因以下文件的损坏或者丢失,windows无法启动hal.dll
  • win7系统的话筒在哪设置
  • 缩略图无法显示
  • packethsvc.exe - packethsvc是什么进程 有什么用
  • win7系统搜索在哪
  • win7系统可移动的文件
  • win7如何查询电脑使用记录
  • cocos2dx怎么用
  • webpack基本使用
  • netcfghlp怎么安装
  • nodejs 文档
  • vue实战案例
  • Android--VideoPlay--视频播放器
  • jquery点击按钮切换图片
  • 财务跨期报销问题
  • 铅球七米
  • 税控盘打不开
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设