位置: 编程技术 - 正文

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

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

  • 挂靠别的公司都需要交什么税
  • 什么是价税分离的原因
  • 建安增值税怎么计算
  • 财务金额表格
  • 加班餐费有发票怎么入账
  • 金蝶系统如何设置套打
  • 税控服务费减免税款分录
  • 所得税筹划的意义
  • 银行电子回单是原始凭证吗
  • 存货报废需要进项转出吗
  • 原材料暂估少了如何调整
  • 增值税广告服务包括哪些内容
  • 第三方佣金及成本还是费用
  • 企业所得税调增项目有哪些
  • 投标保证金支付时间
  • 公司卖出汽车怎样做账
  • 没有申报增值税不能领发票吗
  • 免抵调增值税是否缴纳附加税
  • 已经在网上申报学校可以改学校吗
  • 小规模开专票不超过45万要交税吗
  • 出口退税备案信息
  • 个体户网上报税流程视频
  • 企业产品成本的构成项目主要有哪些
  • 企业收到党建经费 所得税
  • 子公司搭建
  • 财政给企业的补助资金企业是否需要开发票
  • 享受小型微利企业标准
  • 做金融服务要什么资格
  • 怎么确认投资性资金
  • 公司聚餐费属于哪个科目
  • 怎么清除更新记录
  • 华为鸿蒙系统怎么样
  • msdn原版win7
  • deepin如何设置网络
  • 收藏的php常用函数是什么
  • 别再等待别在徘徊是什么歌
  • 错账是什么
  • php测试mysql 数据库连接
  • 环境保护税的征税范围及计税依据
  • 数据库设计框架
  • 关于商业承兑汇票的多选题有哪些
  • idea如何导入sql文件
  • 【深度学习笔记】特征融合concat和add的区别
  • 瑞吉外卖项目简历
  • python二叉树遍历算法
  • 固定资产多少可以上市
  • dedecms仿站如何做
  • 关联广告是什么意思
  • 长期股权投资会计准则2021修订
  • sqlserver根据查询结果创建表
  • 增值税附加税的计算基数
  • 电子承兑汇票到期怎么兑现
  • 公益性捐赠会计利润总额计算方法
  • 房地产成本核算对象
  • 个人向公司借款流程
  • 营业成本包括三大费用如何称呼
  • 预缴增值税扣除额用填写吗
  • win8怎么锁定屏幕
  • win10 build 21277
  • 激活窗口的菜单的快捷键
  • centos7权限
  • win7系统开机蓝屏0x0000007b
  • winxp系统介绍
  • Win10中SmartScreen无法设置需要系统管理员身份该怎么办?
  • 电源管理器在哪
  • cocos2d schedule
  • cocos2dx-js
  • js堆栈和队列
  • node.js入门
  • 网页javascript错误
  • 安卓版影音播放器哪个好用
  • ecmascript6 官方文档
  • 重庆电子税务局app下载
  • 国家税务总局广东省税务局待遇
  • 武汉税务代理大概多少钱
  • 建筑工程施工企业资质
  • 税务u盘是干嘛的
  • 怎样在电子税务局申报社保
  • 骗取国家出口退税罪
  • 新四板企业哪里可以查询
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设