To be honest, I have no experience with AMS at all, so thank you for the information 🙂
Setting the references (either _objectReferences, or _references in SerializationPair) directly would not work correctly because those references go on pair with the actual serialization json string. So, even if you set the references via reflection, the reference will be cleared as soon as the variable is serialized again, since by setting the reference there only, it does not also set the variable value.
So, your original way of doing it (using bb.SetVariableValue) is actually the most correct way as well. That is because doing this, will actually set the Variable value and then as a result of that, when the Blackboard is being serialized, it will store the reference to the _references list.
I hope this makes sense, but please let me know if not. 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.