Tree broken during upgrade?

Arakade

New member
Hi, Justin
I have some external behaviours that I haven't checked for a while but would like any suggestions with restoring to working order please!

There seem to be a couple of problems:

- some ”left hand sides” in the JSON are numeric (e.g. instead of ”Int32mValue”, it had an integer),
- some of the ”right hand sides” in the JSON are wrong (e.g. instead of 12 for max speed, it has a default value 0 or null instead of a shared reference).

Some of these trees may have been created before 1.5.6 with binary serialisation. I guess it could be one/more of the following changes that broke them:

- switching from binary to JSON for the trees,
- switching Unity to force text,
- upgrading Behaviour Designer (I'm currently on 1.6.1),
- upgrading Unity (currently on 2018.3.6).

I believe they /were/ working before moving to 2018 and or 1.5.12? Meaning I'm pretty sure they were fine with the text + JSON move agree back.

I have Git history for them so I'm wondering if there's a path to restoration involving something like restore known good then take n steps?

I've done /some/ of one by unpacking the JSON (removing escapes) from both current and an old version then using a side-by-side diff to spot mistakes and copying values across then reversing and pasting back into the asset. Obviously this was painful and I still don't have it fully working.

Did I miss some migration steps for some previous version? I tried looking on the old forum but it seems it's no longer available.

Any thoughts appreciated.
Thanks, Rupert.
 
The serialization changed pretty dramatically in 1.5.7 and I removed support for that old serialization in version 1.5.11 or 1.5.12. Do you have a copy of an old Behavior Designer version in that repository? You should be able to upgrade the serialization to a version between 1.5.7 and 1.5.11 and then upgrade to the current.
 
Not sure. I'll have to check next week. What actions will I need to perform to ensure it updates properly?

If not, what manual file changes would I need to perform to update to the new form?

I tried to create a lookup table from names to numbers by working in reverse but couldn't seem to get the right code. Is there sample code to translate? I tried hashing types, type names, commas between and saw the binary one uses SHA1 under some circumstances. Still couldn't figure it out!

Anyway I'm pretty sure I got most of the stuff for the first file I did but when run, the tree behaves oddly -- sitting showing ”running” status for an Inverter?! (I think -- had to put aside before fully grokking)

Thanks.

The serialization changed pretty dramatically in 1.5.7 and I removed support for that old serialization in version 1.5.11 or 1.5.12. Do you have a copy of an old Behavior Designer version in that repository? You should be able to upgrade the serialization to a version between 1.5.7 and 1.5.11 and then upgrade to the current.
 
There have been a lot of changes in serialization between versions so it's going to be tough to get the data to line up with the version that you are using. You'll need to first upgrade to a version 1.5.7 and 1.5.11, and then upgrade to the latest. In your repository do you have a version between 1.5.7 and 1.5.11 saved?
 
Top