-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Some Attribute #21
Support Some Attribute #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@witalosk
プルリクありがとうございます!
いい機能追加だと思います
2点修正の提案でコード内にコメントしてみました
また将来的な課題として(UI.Field()のようにメンバーが自動的に展開されるエレメントである)UI.Slider(),UI.MinMaxSlider()への対応も考えたいと思います
処理の共通化とExampleのまとめ方などを考える必要がありちょっとめんどくさそうなのでまずはこのプルリクでUI.Field()のみの対応としたいと考えてます
@@ -204,9 +209,10 @@ public ReflectionCache(Type type, IReadOnlyCollection<FieldInfo> fis, IEnumerabl | |||
{ | |||
type = pair.Item2, | |||
memberInfo = pair.Item1, | |||
propertyAttributes = pair.Item1.GetCustomAttributes<PropertyAttribute>().ToArray(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@witalosk
PropertyAttribute.order順にするのはここでやっちゃっえば、BinderToElement_Field.csでOrderBy()しなくていい気がします
range = pair.Item1.GetCustomAttribute<RangeAttribute>(), | ||
isHideInInspector = pair.Item1.GetCustomAttribute<HideInInspector>() != null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@witalosk
HideInInspectorAttributeでフィールドを非表示にするのはこの下で、
「HideInInspectorAttributeならuiTargetPropertyOrFieldsNameTypeDic
への登録を省く」とすると、UI.Slider()などにも対応できるのでよさそうです
@fuqunaga |
🎉 This PR is included in version ga.fuquna.rosettaui-v1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
クラスのメンバーを描画するときに、
[Header("header")]
,[Space]
,[HideInInspector]
属性を表示に反映するようにしました。When drawing members of the class, the
[Header("header")]
,[Space]
, and[HideInInspector]
attributes are now reflected in the drawing.