mackysoft / Unity-SerializeReferenceExtensions

Provide popup to specify the type of the field serialized by the [SerializeReference] attribute in the inspector.
https://qiita.com/makihiro_dev/items/26daeb3e5f176934bf0a
MIT License
770 stars 59 forks source link

New JSON and Copy/Paste features break plugin for Unity 2020 #46

Closed hlgott1593 closed 9 months ago

hlgott1593 commented 9 months ago

What happened?

Hi, This is not really a bug but the README says backwards compatibility to Unity 2019 which does not seem correct anymore.

The issue is both features attempt to get the value of SerializedProperty.managedReferenceValue which is write only for Unity 2020 (any maybe prior did not look into when they changed this). https://docs.unity3d.com/2020.3/Documentation/ScriptReference/SerializedProperty-managedReferenceValue.html

Considering this is a 3 year old version of unity it is understandable if you do not plan to fix this but if that is the case please update the README with which version of the plugin are supported on each Unity major version.

Thanks (love the plugin btw :))

Package Version

1.2.0

Unity Version

2020.3.48f1

mackysoft commented 9 months ago

Hi @hlgott1593

Fixed to not use getter of SerializedProperty.managedReferenceValue in versions less than Unity 2021.3. This makes it possible for the latest packages to be available in versions lower than Unity 2021.3.

Latest version here. Please contact me if you have any problems. https://github.com/mackysoft/Unity-SerializeReferenceExtensions/releases/tag/1.2.1

Thanks for reporting!