3#include "pixelbullet/filesystem/virtual_path.h"
4#include "pixelbullet/filesystem/virtual_path_serialization.h"
5#include "pixelbullet/scene/behavior_state_machine_asset.h"
13 std::vector<BehaviorBinding> bindings;
14 std::vector<BehaviorStringParameterValue> string_parameter_overrides;
18 return enabled == other.enabled && behavior_asset.LogicalPath() == other.behavior_asset.LogicalPath() &&
19 bindings == other.bindings && string_parameter_overrides == other.string_parameter_overrides;
25 node[
"enabled"] << component.enabled;
26 node[
"behaviorAsset"] << component.behavior_asset;
27 node[
"bindings"] << component.bindings;
28 if (!component.string_parameter_overrides.empty())
30 node[
"stringParameterOverrides"] << component.string_parameter_overrides;
37 if (node.HasProperty(
"enabled"))
39 node[
"enabled"] >> component.enabled;
43 component.enabled =
true;
46 if (node.HasProperty(
"behaviorAsset"))
48 node[
"behaviorAsset"] >> component.behavior_asset;
52 component.behavior_asset = {};
55 if (node.HasProperty(
"bindings"))
57 node[
"bindings"] >> component.bindings;
61 component.bindings.clear();
64 if (node.HasProperty(
"stringParameterOverrides"))
66 node[
"stringParameterOverrides"] >> component.string_parameter_overrides;
70 component.string_parameter_overrides.clear();
73 NormalizeBehaviorBindings(component.bindings);
74 NormalizeBehaviorStringParameterOverrides(component.string_parameter_overrides);
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition virtual_path.h:10
Definition behavior_state_machine_component.h:10