As a developer, I was fiddling around with BD and the source package installed, trying to grasp the possibilities this product opens up.
At one point I saw that the Global Variables live in a serialized asset file. Nevertheless, it seems possible to have global variables of reference types into the scene graph (e.g. GameObject reference).
Does that even make sense? I tried around a bit and it seems to work while the scene is loaded. As soon as I load another scene the reference obviously gets destroyed. I would think it makes sense to simply remove global reference types, as I don't see a use-case for it. Scene reference types in Behavior-Tree parameters (variables) make sense because they are overridden in the scene for each instance of an (external) behavior tree.
Also: How is memory management for instanced behavior trees, like when I attach the same external BT to different GameObjects in a scene. Do they get unloaded when I change the scene and re-loaded when the scene is loaded again? Are they intelligently cached somehow?
Thanks in advance for any insights from this developer perspective.
At one point I saw that the Global Variables live in a serialized asset file. Nevertheless, it seems possible to have global variables of reference types into the scene graph (e.g. GameObject reference).
Does that even make sense? I tried around a bit and it seems to work while the scene is loaded. As soon as I load another scene the reference obviously gets destroyed. I would think it makes sense to simply remove global reference types, as I don't see a use-case for it. Scene reference types in Behavior-Tree parameters (variables) make sense because they are overridden in the scene for each instance of an (external) behavior tree.
Also: How is memory management for instanced behavior trees, like when I attach the same external BT to different GameObjects in a scene. Do they get unloaded when I change the scene and re-loaded when the scene is loaded again? Are they intelligently cached somehow?
Thanks in advance for any insights from this developer perspective.