Not a Bug

Failed deserialize FlowMacro using Odin Serializer

t1ny_bear 1 year ago updated by Lazlo Bonin (Lead Developer) 8 months ago 2

Hi everyone!

I have added a custom type to the graph variable. When I deleted the custom type class, my flow macro now is empty because of it won't to deserialize.

There's error stack : ErrorStack.txt

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Bolt 2

You must delete the units that already exist. Restore your files from the trash / recycling bin, delete the units, and then remove your files.

This has always been how it works. Only way to really circumvent that is for the source itself to find every macro and embed, find every unit including all nested embeds, and type check every single one. That would get kinda expensive, and take even more time after the editor hot reloads. I think that's 100% exceptable as a manual process though.

I know someone at one point in the past created a tool that can mass delete units by type name. Icuras I think was the user. Don't think it's been updated though? Not sure.

I've also slowly been working on a add-on Find and Replace, that belongs to a new framework to create graph tools for working with the graph better. I definitely think this would fit the bill, something additional I can add to it. 

Your graphs are fine though. You just can't use them. Your data is in tact.

Not a Bug


As Jason mentioned, when using your own custom types in graphs, if you delete the type, you might run into issues like these with the graph asset. Bolt tries to recover elegantly whenever it can for reflected units, but for variables it's much harder, because the variable data is serialized too, which confuses any serialization engine. I'll mark as NAB for now, but if the issue persists in the new 2.0a6 variable workflow, do let us know and we'll investigate how to recover more elegantly.