位置: 编程技术 - 正文

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

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

  • 借转股意思
  • 企业购买产品
  • 季度企业所得税可以不预缴吗
  • 小规模纳税人印花税是季报还是月报
  • 申报个税大病医疗如何申报
  • 企业租给企业房产税税率
  • 物流企业会计核算的主要内容
  • 小规模纳税人怎么查询
  • 外经证预缴税款之后剩下的税款交到哪呢
  • 土地使用证明可以补办吗
  • 销售额增加10%什么概念
  • 房产继承税征收标准是多少
  • 商砼税率是多少?
  • 开个人发票需要身份证号码吗
  • 累计折旧要结转到本年利润吗
  • 小规模增值税附加税
  • 简述国内采购流程
  • 怎么利用喜欢自己的人
  • 原材料暂估入账产生的差异如何处理
  • 最新版win10激活
  • 王者荣耀中苏烈的最强出装
  • 手工明细分类账本怎么记
  • php开源软件
  • 税点款怎么算
  • 日记账登记错了怎么办
  • 认缴出资没到位违法吗
  • ghost打开
  • 权限控制的原则是什么
  • 车辆购置税征收对象
  • 临时工工资计入哪里
  • 奥杜邦的祈祷经典语录
  • 贸易公司和生产厂家怎么合作能够双赢
  • 为什么那么多人考公务员
  • 领航ct
  • vue怎么嵌入html
  • linux命令bzip2
  • 结转增值税的账务处理
  • 法院判决后的利息
  • 筹办期发生业务怎么办
  • PHPCMS 是 ThinkPHP 开发的吗?
  • sql防御
  • 应收票据到期后账务处理
  • 权责发生制 会计
  • 公司保障措施
  • 总公司和分公司企业所得税分配
  • 销项负数怎么报增值税
  • 委托加工应税消费品是指委托方提供原料和主要材料
  • 已开票未收到款怎么做账
  • 个税汇算清缴时劳务报酬怎么计税
  • 在建工程的预付款账务处理
  • 研发费用加计扣除的条件
  • 小规模公司销项发票税额记到哪里了
  • 自产产品用于不动产
  • 递延所得税负债会计分录
  • 外币汇率分录
  • 如何理解事业单位处罚暂行条例中第十八条的兼职规定
  • 车辆购置税能抵扣企业所得税吗
  • 可交换债券发行方的会计处理
  • 税务局退款会计分录
  • mysql newid()
  • windows pe无法启动怎么办
  • 服务器控制电脑
  • 如何用pe弄双系统引导
  • windows自带的应用程序
  • 联想笔记本从U盘启动
  • win10默认edge浏览器
  • win10右键菜单管理在哪打开
  • win10系统无法卸载补丁
  • linux怎么切到桌面
  • msworks.exe - msworks是什么进程 有什么用
  • linux crontab用法
  • opengl绘制三维图形代码
  • 开源项目怎么做
  • python的设置
  • javascript基础编程
  • 已办理了退休,档案还需要保存吗
  • 国家税务总局办税指南
  • 化妆品关税怎么算
  • 代理记账资质办理在哪个网站提交申请
  • 工伤保险怎么补申报
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设