JetBrains / resharper-unity

Unity support for both ReSharper and Rider
Apache License 2.0
1.21k stars 131 forks source link

Warning never assigned on [SerializeReference] using interface #2426

Open SwingWren opened 8 months ago

SwingWren commented 8 months ago

When using [SerializeReference] attribute and an Interface you get a never assigned warning image

igor-elovikov commented 7 months ago

It also affects collections and with collections rider always suggesting to convert it to readonly (which breaks serialization) https://youtrack.jetbrains.com/issue/RIDER-94348/SerializeReference-and-generic-collection-holding-interface

Currently it's very annoying to use [SerializeReference] with any form of interface which is a very valid use case.