Renaming keys / removing keys
InZan17 opened this issue ยท 3 comments
I have a component which i use for chunks to just store the last time it was ticked and I would like to rename the key. The problem is that when I rename it and start the game and load into a world I get a bunch of warnings saying "Failed to deserialize component: unregistered key (old key)". Everything works fine but the warnings are annoying. Is there any way to get rid of those warnings?
These warnings should only display once, but if you want to avoid them you can release an intermediary version with a key that serializes absolutely nothing (e.g. using TransientComponent
), registered with the old component ID.
The warnings still display when I rejoin the world, but using TransientComponent worked for me. Thanks!
Here, added a wiki page that may be helpful : https://github.com/OnyxStudios/Cardinal-Components-API/wiki/Migrating-components-(removing-them-or-changing-their-ID)