Currently we have some ScriptableObjects that are referenced by their name. This comes with some issues as names may change and also they don't have to be unique. We would like to switch to UUIDs.
using FullSerializer;
[System.Serializable]
[fsObject(Converter = typeof(CharacterDataConverter))]
public class CharacterData
{
public CharacterSO player;
public CharacterSO mentor;
}
The mentor field is currently serialized as mentorName. With the changes the serialized field name would be mentorUid. This is handled by the CharacterDataConverter, but this has to be updated all the time when CharacterData class changes and is often forgotten.
Much simpler would be to use fsProperty:
using FullSerializer;
[System.Serializable]
public class CharacterData
{
[fsProperty(Converter = typeof(PlayerConverter)]
public CharacterSO player;
[fsProperty(Converter= typeof(CharacterSOConverter), Name="mentorName")]
public CharacterSO mentor;
}
But this can handle only either mentorName or mentorUid.
Is there another solution? Maybe using versioning?
Currently we have some ScriptableObjects that are referenced by their name. This comes with some issues as names may change and also they don't have to be unique. We would like to switch to UUIDs.
The
mentorfield is currently serialized asmentorName. With the changes the serialized field name would bementorUid. This is handled by theCharacterDataConverter, but this has to be updated all the time whenCharacterDataclass changes and is often forgotten.Much simpler would be to use
fsProperty:But this can handle only either
mentorNameormentorUid.Is there another solution? Maybe using versioning?