BonsaiBehaviourTree icon indicating copy to clipboard operation
BonsaiBehaviourTree copied to clipboard

Refactor out Tree Meta Data (Graphical) from the Core classes

Open luis-l opened this issue 4 years ago • 0 comments

The BehaviourTree and BehaviourNode classes store Tree Meta Data.

The meta data is defined inside UNITY_EDITOR blocks and stores information such as Node Position, Pan, Zoom, etc. This meta data is only relevant to the BonsaiDesigner.

This was initially done so data was centralized in one place and serialized along with the ScriptableObject.

The data should be moved outside the core classes.

An approach can be storing all this data in a separate ScriptableObject (TreeMetaData class). This object would be added under the BehaviourTree asset object so all data is centralized. In play mode, the tree instance running will not use this data at all.

luis-l avatar Jul 05 '20 17:07 luis-l