dbrizov / NaughtyAttributes

Attribute Extensions for Unity
MIT License
4.53k stars 464 forks source link

NaightyAttributes import affects to UI view even without using any attribute #353

Open novavision opened 1 year ago

novavision commented 1 year ago

Well, while title may looks harmles, it is not in a fact. For a long time I tried to define what was the reason of bug when the list element selected text field was copying to next element on stoll down/up. Please check the video I attached to get the idea, what's exactly wrong.

I though it's a Unity bug but I never could reproduce it in the clean Unity project. Finally I realized that happes just after NaightyAttributes import even without any attribute use.

To repoduce it (in any Unity version):

  1. open the project attached
  2. select the scriptable object in Assets
  3. expand all element and make sure you can scroll the content
  4. scroll down while the text field is selected

To ensure it's NaugthtyAttributes issue, just remove the asset. Btw you may notice that list of elements will look different - using NaughtyAttributes it's expanded to entire height depending on elements count & size, while by default Unity renders it in a half if window height.

https://user-images.githubusercontent.com/5512405/224555924-bb1c807f-a079-45e8-a54d-db7cefdf2763.mp4

project