There is a bug, where entire BBParameter can be null (not value, but BBParameter reference),
This can be reproduced as following:
– create 2 separate graphs
– create custom action. You may leave it empty for now
– add this action into each graph. Add each graph to the scene to seprate gameobject
– now go to your custom action class, add BBParameter there, for example float. Check null value OnExecute()
– do NOT open any graph, go into play mode, and now BBPArameter will be null, because I presume graph has not been opened and UI did not tell it to create and serialize BBParameter instance.
however this is a huge issue, as we add new BBParameters quite often into our custom tasks, and we have dozens of graphs, so they are null in all of them.
Expected result is that when graph is created during play mode, each created action task instance should also check if some BBParameter is not null, as I presume when loading it from serialized state, they are null there.
Hello again. There is actually a serialization-related attribute on BBParameters to auto-create an instace if null, but this is only checked/used in serialization rather than deserialization for performance reasons (since we want deserialization to be as fast as possible). An instance will be created though when unity serialize the graph regardless of whether or not the graph UI open. I will see if I can make use of the attribute in deserialization as well if it does not impact performance a lot. With that said, you could also initialize your BBParameters in your tasks to make sure they are not null like so for example BBParameter<float> number = 0f
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.