[BUG] Copy-paste doesnt work if subclass selector used in Serializable class
What happened?
Copy and Paste properties doesn't work if you put SerializeReference objects inside regular SerializeField objects. Per example:
Then when you try to copy TestData in inspector you only get Copy option that can't copy anything related to SerializeReference:
Moreover if in this setup you try to copy just filter:
Similar problem with SubclassSelector collections. Is this intended or it's a bug? And if it's not bug then can you please add support for such type of Copy-Paste
Package Version
1.6.1
Unity Version
6000.3.7f1
This is occurring because of JsonUtility.FromJsonOverwrite, if the value that is being assigned to is currently null it will throw that error. This project currently has no handling for when trying to paste into a null target.
I have created a PR for this issue (As well as other type-safety checks when pasting) #103, we'll see where that goes when reviewed.
Thank you for the report and reproduction details. #107 has been merged into main and fixes the exception when pasting a single managed reference into a null destination. This includes individual references inside ordinary serializable parents and individual elements of managed-reference collections. I am closing this issue as completed for that paste bug.
We are declining support for copying an entire [SerializeField] parent object or a whole collection. Copying a general serialized object tree would expand this package beyond its scope of selecting and editing individual managed-reference fields.