位置: 编程技术 - 正文

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

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

  • 无形资产摊销的会计科目
  • 已收保证金
  • 异常增值税扣税凭证
  • 公司老账怎么处理
  • 油费预付卡如何开发票
  • 建筑业预缴税款都要填哪些表
  • 存货周转次数变高的可能原因是
  • 公司支付倒垃圾费怎么做会计分录
  • 新办企业汇算清缴流程
  • 个体户要申报哪些报表
  • 逾期增值税扣税凭证抵扣问题
  • 广告业增值税税率6%是多少
  • 公司奖励旅游算休年假吗
  • 公司账上的存货是怎么来的
  • 以前年度损益调整会计分录
  • 一般纳税人十万以下免教育费附加
  • 工资不用交税还用上报么
  • 1697509099
  • 残值收入的会计处理
  • msoobe.exe是什么
  • 营业收入包括应收账款吗
  • 个人独资企业怎么做账
  • php imagettftext()函数
  • 真正有效解决近视的方法
  • php批量上传
  • 增值税发票月度统计
  • 稳岗补贴怎么发放给员工
  • 公司购买土地建厂房怎么入账
  • css 100vw、100vh出现滚动条怎么解决
  • smart 变量表
  • uniapp跳转页面没反应
  • PHP面向对象程序设计
  • 愚公全名
  • torch测定
  • 云质信息
  • vue鼠标悬浮菜单
  • 3d沙盒游戏推荐
  • docker_practice
  • 个税网上申报流程视频
  • phpweb缓存技术
  • 印花税的花贴在哪里
  • 对公账号可以绑定微信提现吗
  • wordpress全站伪静态
  • 收到返工费会计分录
  • 税收筹划类型有哪几种
  • 金蝶暂存凭证怎样转正常凭证
  • 房产公司业务招待费扣除政策
  • 分支机构注销后往来账如何处理?
  • 进项认证怎么算
  • 固定资产清理在贷方怎么结转
  • 非同一控制下企业合并取得的长期股权投资
  • 税种分类及其税率
  • 企业解散清算程序
  • 开服务业发票要交印花税吗?
  • 小规模转一般纳税人条件最新政策
  • 股权关系怎么描述
  • 健全的财务会计制度承诺函
  • 新成立企业建账流程
  • sqlserver1053怎么解决
  • 一些文件未注册怎么删除
  • win8系统如何安装软件
  • win8系统如何关闭杀毒系统
  • centos fedora
  • centos yum 命令
  • linux的移植
  • win8显示wifi关怎么办
  • 缺少系统操作怎么办
  • 翻转动画怎么做
  • node·js
  • unity 1
  • node.js异步编程
  • jQuery easyui的validatebox校验规则扩展及easyui校验框validatebox用法
  • js代码怎么使用
  • 关于Colloder事件
  • 《JavaScript高级程序设计》pdf链接
  • android studio 安装好后怎么在桌面找到
  • python常用的内置逻辑判断函数
  • 怎么用python画图具体步骤
  • 小规模纳税人收到增值税专用发票怎么办
  • 教育附加费网上缴费
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设