位置: 编程技术 - 正文

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

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

  • 办理出口业务流程
  • 电汇凭证的会计怎么做账
  • 在建工程人员工资计入产品成本吗
  • 机械设备关税税率多少
  • 冲红票需要给购方吗
  • 出让固定资产怎样计算增值税
  • 企业注销后资产如何处置
  • 零售通收银
  • 收取现金后的收入怎么算
  • 出售股票或债券的条件
  • 资产处置收益计入哪个会计科目
  • 适用增值税简易计税的项目
  • 已报税的发票可以作废吗
  • 小规模纳税人如何交增值税
  • windows defender隔离区
  • 企业注销时实收资本为0
  • 结转已经销售商品成本
  • 税务检查所得税调整
  • WordPress置顶文章的相关PHP函数小结
  • 银行贷款发放怎么做凭证
  • 企业转手员工工龄怎么算
  • 上年度成本费用包括哪些
  • 在vue3项目中自定义组件通常存放在
  • uniapp传值
  • 工业制品买卖
  • 企业取得的搬迁补贴
  • el-table(type=“selection“)多选框两种回显
  • 其他营业账簿印花税减免政策
  • 人工智能专业计算机科学与技术
  • 制造费用账户在期末被结平
  • 设备维修产生的人工费怎么开发票
  • 付检测费会计分录
  • mit?
  • 无形资产摊销的方法
  • layui框架模板
  • 企业职工薪酬如何确定
  • 结转清理损失会计分录
  • python 顺序
  • Testing Applications with WebTest¶
  • SQLite3 命令行操作指南
  • hashmap的使用场景
  • 企业租赁厂房需要交什么税
  • 购买监控器计入什么科目
  • 专项储备期末有余额吗
  • 知道商品的进价怎么定售价
  • 已计提完的固定资产怎么做账
  • 直接转销法还允许使用吗
  • 变动成本法的计算步骤
  • 购买二手车后
  • 其他应付款怎么冲平影响会计利润吗
  • 应收票据周转率公式
  • 为什么白条不能打白条
  • 湖南残保金优惠政策
  • 母子公司可以合并吗
  • 进项税红字发票怎么样申报
  • 企业亏损净资产降低吗
  • 票据贴现怎么入账
  • 施工企业会计成本费用论文3000字
  • 合资公司政策
  • 上个月成本算少了怎么办
  • 购买税盘全额抵扣会计分录
  • 劳动关系从什么时候确立
  • 其他收入属于什么收入
  • Xp系统的桌面文件在哪里
  • linux route -n命令结果详解
  • vista和win10
  • windows10如何多选文件
  • centos安装编译环境
  • window10找不到安装的软件
  • div 绝对位置
  • jquery 滑块
  • 编写批处理
  • 猫猫的娱乐
  • 怎么看网页的编码格式
  • android root 原理
  • 四川省职称查询平台
  • 四川税务服务大厅
  • 医生算是公务员吗?
  • 江苏电子税务局电话
  • 客运站汽车票查询真伪
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设