resharper-unity
resharper-unity copied to clipboard
Classes derived from IStartupLocaleSelector is marked as unused if not serialisable
This is used from Unity's new localisation package
IStartupLocaleSelector can be implemented by user code, and used as part of a [SerializeReference] field in LocalizationSettings. This means the class must be serialisable. If it's not, then the class may be marked as unused. The correct fix is to add [Serializable]. Ideally, Rider/ReSharper would warn that the class is not serialisable.