Open nimdavirus opened 2 months ago
Fixed. You just need to change the method declarations in the ScriptInstance.cpp:
"void Load(Serializer&)" -> "void Load(VectorBuffer&)" "void Save(Serializer&)" -> "void Save(VectorBuffer&)"
and change the declarations in the script itself.
This solution does not seem correct to me. Can you explain why it works?
This solution does not seem correct to me. Can you explain why it works?
ScriptInstance pushes MemoryBuffer and VectorBuffer in SetScriptDataAttr and GetScriptDataAttr script executions, so I changed declarations to VectorBuffer. I don't know why Serializer doesn't work, although VectorBuffer and MemoryBuffer are relatives of Serializer
It is impossible to save in Serializable in scripts, all Write functions return a false ( void Save(Serializer& serializer) ). For example, if I run 18_CharacterDemo.as by Urho3DPlayer.exe from batch file and save&load a scene there is also doesn't work saving, the character just rotate to 0 yaw and 0 pitch. If I run CharacterDemo from C++ it works because there are URHO3D_ATTRIBUTE.