Unity-Technologies / InputSystem

An efficient and versatile input system for Unity.
Other
1.43k stars 310 forks source link

FIX: tree state in treeview should be preserved when saving (ISXB-966) #1967

Closed smnwttbr closed 2 months ago

smnwttbr commented 3 months ago

Description

When the input action asset is saved, the selection state of the trees in the editor will occasionally be reset.

Changes made

The TreeStateView has now been setup correctly.

Testing

Manual testing only.

Risk

Risk is 0.

Checklist

Before review:

During merge:

After merge:

Pauliusd01 commented 3 months ago

@smnwttbr will take a look at this today. At first sight though there seems to be a lot of CI failures, have you looked into those yet? Fine for me to test or are you planning some revisions?

smnwttbr commented 2 months ago

InstanceID was being used for the viewDataKey, which changes on domain reloads.

Pauliusd01 commented 2 months ago

https://github.com/user-attachments/assets/4af90b49-786b-48db-986d-4aae0bc3b5cf On heavier, domain reload prone projects (like the one in the alternative steps) the selection is still reset but the expansions are maintained so it is still a noticeable improvement. Just making sure this is expected? I'm fine with approving as I did not notice any issues