Attribute [field: SerializeField] for properties is unseen while rearranging

So, I have the next code in my File Layout settings

<Entry DisplayName="Serialized Properties" Priority="100">
<Entry.Match>
<And>
<unity:SerializedField />
</And>
</Entry.Match>

<!-- No sorting -->
</Entry>

How I can match my property

[field: SerializeField]

private int Stuff {get; set;}

to be affected by this rule?

3 comments
Comment actions Permalink

Hi Artem Yurchenko

This construction should works. I'd recommend removing <And> tag as you have only one condition in it. Also please check that you use Unity file layout tab.

0
Comment actions Permalink

So, for some reason, it doesn't work. And of course, I do that in the Unity tab.

About <And> tag:

originally I have the next pattern, but it doesn't work too

<Entry DisplayName="Serialized Properties" Priority="100">
<Entry.Match>
<And>
<unity:SerializedField />
<Or>
<Kind Is="Property">
<Kind Is="Autoproperty">
</Or>
</And>
</Entry.Match>

<!-- No sorting -->
</Entry>
0
Comment actions Permalink

Artem Yurchenko could you please share screenshots of your sample code before and after cleanup? What is your Rider version? Thanks!

0

Please sign in to leave a comment.