EnableBehavior>ArgumentException: Version string portion was too short or too long (v1.7.7-unity2022)

rachids

New member
Hi, i face this issue with last BEHAVIOR DESIGNER Vesrsion 1.7.7
ArgumentException: Version string portion was too short or too long

1700324219635.png

any solution please !
 
That post looks like a different error. I'm confident that the error that you are getting has been fixed. Can you try creating a fresh project, download and import Behavior Designer from the Asset Store, and then try again?
 
That post looks like a different error. I'm confident that the error that you are getting has been fixed. Can you try creating a fresh project, download and import Behavior Designer from the Asset Store, and then try again?
i face this issue on weekend so i try my best before submit his ticket i already try in new project and its work fine but on project this bug for some reason shown, on my project the 1.5V was work fine but after upgrade from 1.5 to 1.7.7 i face it (
 
update :

public static void Load(TaskSerializationData taskData, BehaviorSource behaviorSource, bool loadTasks)
{
behaviorSource.EntryTask = null;
behaviorSource.RootTask = null;
behaviorSource.DetachedTasks = null;
behaviorSource.Variables = null;

var taskSerializationData = taskData;
Debug.Log("[checkVersion] => treeVersion=" + taskData.Version);

}
the output of this Log is Empty :
1700480892050.png
 
so those lines will failed :
var treeVersion = new Version(taskData.Version);
Debug.Log("[checkVersion] => treeVersion=" + treeVersion);
updatedSerialization = treeVersion.CompareTo(new Version("1.5.7")) >= 0;
enumSerialization = shaHashSerialization = strHashSerialization = false;
if (updatedSerialization) {
shaHashSerialization = treeVersion.CompareTo(new Version("1.5.9")) >= 0;
if (shaHashSerialization) {
strHashSerialization = treeVersion.CompareTo(new Version("1.5.11")) >= 0;
if (strHashSerialization) {
animationCurveAdvance = treeVersion.CompareTo(new Version("1.5.12")) >= 0 ? 16 : 20;
enumSerialization = treeVersion.CompareTo(new Version("1.6.4")) >= 0;
}
}
}
 
Ah, version 1.5. There were a lot of serialization changes in that feature cycle. The current serialization code only supports version 1.5.7 or later. If you upgrade from a previous version then you will need to do intermediate reserializations (with version 1.6.x) in order to update to the latest. With that said, if you manually put in a version does it work correctly?
 
I will send you a PM with the version that I have. I don't have too many older versions but do have a backup of 1.6.1 which I hope you'll first be able to update to with your tree.
 
I will send you a PM with the version that I have. I don't have too many older versions but do have a backup of 1.6.1 which I hope you'll first be able to update to with your tree.
after more investigation between the versions i detect 2 serialization different Items :
on 1.7.7 there is those two items that not exist on old serialization and i think the both element not really important

1-mBehaviorSource=>mTaskData=>Version
2-mBehaviorSource=>mTaskData=>fieldSerializationData=>fieldNameHash

do you think there is a way/trick to let script ignore those values ,i have too many external behaviors and re-create them will take so much time plz help thank you
 
@Justin

update :
Look like you replace the typeName(string) as Key to fieldNameHash(int) in BinaryDeserialization so things become more complicated for me ,the new Behavior Designer not support its old work so cant upgrade and the old version not support new unity versions already stuck for 5 days with this issues .
please provide any solution for situation, thank you
 
The current version of the serialization requires those fields to be filled in. As you mentioned there have been some significant serialization changes so you need to intermediately update the versions. Version 1.6.1 should work though since that serialization definitely supported version 1.5, and we've had other customers go through the same upgrade route. Make sure you are using a tree that was serialized with version 1.5.x when opening in 1.6.1.

Version 1.5 was from 6 or 7 years ago and it would have required a lot of backwards compatibility code in order to support that serialization in the current version.
 
i already try Version 1.6.1 but unfortunately its show serialization errors too , im not suggest editing the plugin source to support the old generated file but some script attached to editor menu that load and regenerate the old files to support the new serialization its just a concept since i dont know the time that can such script cost u , anyway if there is no solutions recreate new files with new version is the only solution and also cost times much times
thank u
 
If you can send a small repro tree with the related assets I can look to see if I have any ideas on why version 1.6.1 isn't serializing it correctly.
 
sorry for delay @Justin this is a Tree with only Log Task (created with V1.5.1) that did not work too please check it yourself
optional : if you can provide me BehaviorDesigner.Editor.dll as a source code this will help me add future to the plugin that help me copy,edit,parse trees from to version to version easy
thank you
 

Attachments

  • TestBehaviorTree.asset
    5.5 KB · Views: 1
For editor source code license please send an email to support@opsive.com with the number of users. The editor source is a separate purchase. In this case though everything is on the runtime side of things so you can download that package from the downloads page.

With that said, I looked at your tree and it really doesn't look like 1.6.1 can open that. I no longer have version 1.5 but can you try switching to JSON serialization? You can change this within the Behavior Designer preferences and it is easier to restore JSON versus binary.
 
Top