18#include <glm/gtc/constants.hpp>
19#include <glm/gtc/matrix_inverse.hpp>
20#include <glm/gtc/matrix_transform.hpp>
22#define GLM_ENABLE_EXPERIMENTAL
23#include <glm/gtx/matrix_decompose.hpp>
24#include <glm/gtx/quaternion.hpp>
30 TransformComponent TransformFromMatrix(
31 const glm::mat4& matrix)
34 glm::quat orientation;
35 glm::vec3 translation;
37 glm::vec4 perspective;
39 TransformComponent result;
49 result.Position = translation;
61 bool NearlyEqualPosition(
65 constexpr float epsilon =
68 const glm::vec3 difference =
82 : m_Entities(other.m_Entities),
83 m_NextHandle(other.m_NextHandle),
84 m_NextID(other.m_NextID),
85 m_DeltaTime(other.m_DeltaTime)
97 std::unique_ptr<Scene>
101 std::make_unique<Scene>(
122 m_RuntimeRunning =
false;
124 m_ScriptInstances.clear();
125 m_NavAgentStates.clear();
129 m_NavigationSystem =
nullptr;
130 m_SpatialQuery =
nullptr;
134 const std::string& name)
136 const std::uint32_t handle =
139 auto [iterator, inserted] =
140 m_Entities.try_emplace(
165 entity.m_Scene !=
this)
170 const auto relationship =
176 const auto children =
179 for (
const auto childHandle :
192 if (relationship.Parent != 0 &&
194 relationship.Parent))
208 DestroyScriptInstance(
211 m_NavAgentStates.erase(
214 m_ParticleStates.erase(
222 std::uint32_t handle)
const
233 std::vector<Entity> result;
238 for (
const auto& [handle, data] :
253 const auto it = m_ScriptInstances.find(handle);
254 if (it == m_ScriptInstances.end())
return std::nullopt;
255 for (
const auto& ptr : it->second)
257 if (!ptr || ptr->GetAIDebugState().empty())
continue;
259 result.
Current = ptr->GetAIDebugState();
260 result.
Previous = ptr->GetAIDebugPreviousState();
263 for (
const auto& e : ptr->GetAIDebugTransitions())
264 result.
History.push_back({e.From, e.To, e.RuntimeSeconds});
270 void Scene::CreateScriptInstance(std::uint32_t handle)
272 if (!
IsValid(handle) || m_ScriptInstances.contains(handle))
return;
275 auto& data = m_Entities.at(handle);
276 auto& instances = m_ScriptInstances[handle];
279 std::fprintf(stderr,
"[BT DIAG] Entity %u configured script '%s', enabled=%d\n",
280 handle, component.ScriptName.c_str(), component.Enabled ? 1 : 0);
281 if (!component.Enabled)
return;
284 if (!definition || !definition->Factory) {
285 std::fprintf(stderr,
"[BT DIAG] Entity %u script '%s' MISSING FACTORY in runtime ScriptRegistry (DLL not loaded/registered?)\n",
286 handle, component.ScriptName.c_str());
289 std::fprintf(stderr,
"[BT DIAG] Entity %u script '%s' factory FOUND\n", handle, component.ScriptName.c_str());
290 auto instance = definition->Factory();
291 instance->m_Entity =
Entity(handle,
this);
292 instance->m_BoundScript = &component;
295 instances.push_back(std::move(instance));
297 if (data.NativeScript) create(*data.NativeScript);
298 for (
auto& script : data.AdditionalNativeScripts) create(script);
303 for (
int pass = 0; pass < 2; ++pass)
304 for (
auto& instance : instances)
if (instance && instance->m_BoundScript &&
305 ((instance->m_BoundScript->ScriptName ==
"BTAssetAgent") == (pass == 1))) {
306 std::fprintf(stderr,
"[BT DIAG] Entity %u OnCreate '%s' (pass %d)\n",
307 handle, instance->m_BoundScript->ScriptName.c_str(), pass);
308 try { instance->OnCreate(); }
309 catch (
const std::exception& ex) {
310 std::fprintf(stderr,
"[Native Script] Entity %u, script %s: %s\n",
311 handle, instance->m_BoundScript ? instance->m_BoundScript->ScriptName.c_str() :
"unknown", ex.what());
319 const auto it = m_ScriptInstances.find(handle);
320 if (it == m_ScriptInstances.end())
return nullptr;
321 for (
const auto& script : it->second)
322 if (script && script->m_BoundScript && script->m_BoundScript->ScriptName == scriptName)
329 std::fprintf(stderr,
"[BT TRACE] ENTER Scene::RegisterEntityBehaviorTreeBindings entity=%u\n", handle);
331 const auto it = m_ScriptInstances.find(handle);
332 if (it == m_ScriptInstances.end()) {
333 std::fprintf(stderr,
"[BT DIAG] Entity %u has NO runtime script instances\n", handle);
336 std::fprintf(stderr,
"[BT DIAG] Entity %u has %zu runtime script instance(s)\n",
337 handle, it->second.size());
338 for (
const auto& script : it->second) {
339 if (!script)
continue;
340 const char* name = script->m_BoundScript ? script->m_BoundScript->ScriptName.c_str() :
"<unbound>";
341 std::fprintf(stderr,
"[BT DIAG] Entity %u registering BT callbacks from '%s'\n", handle, name);
342 std::fprintf(stderr,
"[BT TRACE] BEFORE virtual binding script='%s' ptr=%p\n", name,
static_cast<const void*
>(script.get()));
344 script->RegisterBehaviorTreeBindings(registry);
345 std::fprintf(stderr,
"[BT TRACE] AFTER virtual binding script='%s' action=%d condition=%d\n",
346 name, registry.
HasAction(
"Guard.Attack") ? 1 : 0,
349 std::fprintf(stderr,
"[BT DIAG] Entity %u after '%s': Guard.Attack=%d, Guard.HasTarget=%d\n",
350 handle, name, registry.
HasAction(
"Guard.Attack") ? 1 : 0,
357 const auto it = m_ScriptInstances.find(handle);
358 if (it == m_ScriptInstances.end())
return std::nullopt;
359 for (
const auto& ptr : it->second)
361 const auto* controller = ptr ?
dynamic_cast<const BTScriptController*
>(ptr.get()) :
nullptr;
362 if (!controller || !controller->GetBehaviorTreeInstance())
continue;
363 const auto& snapshot = controller->GetDebugSnapshot();
366 for (
const auto& n : snapshot.Nodes)
367 result.
Nodes.push_back({n.ID, n.Status, n.Ticks, n.Label, n.Depth, n.Active});
368 for (
const auto& e : snapshot.Events)
369 result.
Events.push_back({e.Tick, e.Node, e.Kind, e.Detail});
379 void Scene::DestroyScriptInstance(std::uint32_t handle)
381 auto it = m_ScriptInstances.find(handle);
382 if (it == m_ScriptInstances.end())
return;
383 auto instances = std::move(it->second);
384 m_ScriptInstances.erase(it);
385 for (
auto rit = instances.rbegin(); rit != instances.rend(); ++rit)
386 if (*rit) (*rit)->OnDestroy();
390 Scene::RuntimeParticle>&
392 std::uint32_t handle)
const
394 static const std::vector<
399 m_ParticleStates.find(
404 m_ParticleStates.end()
406 : it->second.Particles;
411 if (m_RuntimeRunning)
414 m_RuntimeRunning =
true;
416 m_ParticleStates.clear();
417 m_NavAgentStates.clear();
418 m_PerceptionStates.clear();
422 std::vector<std::uint32_t> startupHandles;
423 startupHandles.reserve(m_Entities.size());
424 for (
const auto& [handle, data] : m_Entities)
425 startupHandles.push_back(handle);
427 for (
const auto handle : startupHandles)
432 CreateScriptInstance(handle);
437 const auto& data = m_Entities.at(handle);
439 if (data.AudioSource &&
443 const glm::mat4 world =
458 NavAgentRuntimeState state;
460 state.Agent.
Speed() =
462 data.NavAgent->Speed,
472 m_NavAgentStates.emplace(
478 m_PerceptionStates.try_emplace(handle);
485 m_RuntimeRunning =
false;
487 m_SpatialQuery =
nullptr;
489 m_ParticleStates.clear();
490 m_NavAgentStates.clear();
491 m_PerceptionStates.clear();
496 !m_ScriptInstances.empty())
498 DestroyScriptInstance(
505 std::vector<Scene::PerceptionTargetInfo>
508 std::vector<PerceptionTargetInfo> results;
511 const auto stateIt = m_PerceptionStates.find(observerHandle);
513 if (stateIt == m_PerceptionStates.end())
516 const auto& state = stateIt->second;
519 results.reserve(state.Targets.size());
521 for (
const auto& [targetHandle, target] : state.Targets)
535 results.push_back(info);
543 const auto it = m_PerceptionStates.find(observerHandle);
544 if (it == m_PerceptionStates.end() || !it->second.LastSeenHandle ||
545 !
IsValid(it->second.LastSeenHandle))
547 const auto& state = it->second;
548 bool visible =
false;
549 if (
auto target = state.Targets.find(state.LastSeenHandle); target != state.Targets.end())
550 visible = target->second.IsVisible;
552 state.LastSeenElapsed, visible };
555 void Scene::UpdatePerception(
float deltaTime)
557 const float dt = std::max(deltaTime, 0.0f);
559 for (
auto& [handle, data] : m_Entities)
561 if (!data.Perception)
563 m_PerceptionStates.erase(handle);
567 const auto& perception = *data.Perception;
569 if (!perception.Enabled)
571 m_PerceptionStates.erase(handle);
575 auto& state = m_PerceptionStates[handle];
577 if (state.LastSeenHandle)
578 state.LastSeenElapsed += dt;
580 for (
auto it = state.Targets.begin();
581 it != state.Targets.end();)
583 auto& target = it->second;
584 target.TrackedDuration += dt;
585 if (target.IsVisible) target.VisibleDuration += dt;
587 if (!
IsValid(target.EntityHandle))
589 it = state.Targets.erase(it);
593 if (!target.IsVisible)
595 target.TimeSinceLastSeen += dt;
597 if (target.TimeSinceLastSeen >=
598 std::max(perception.MemoryDuration, 0.0f))
600 it = state.Targets.erase(it);
607 state.UpdateTimer += dt;
609 const float interval =
610 std::max(perception.UpdateInterval, 0.01f);
612 if (state.UpdateTimer < interval)
615 state.UpdateTimer = 0.0f;
617 for (
auto& [targetHandle, target] : state.Targets)
619 target.IsVisible =
false;
622 const glm::mat4 observerWorld =
625 const glm::vec3 observerPosition(observerWorld[3]);
629 glm::vec3 forward = -glm::vec3(observerWorld[2]);
634 const float forwardLengthSquared =
635 glm::dot(forward, forward);
637 if (forwardLengthSquared < 0.000001f)
638 forward = glm::vec3(0.0f, 0.0f, -1.0f);
640 forward /= std::sqrt(forwardLengthSquared);
643 std::clamp(perception.FieldOfView, 0.0f, 360.0f);
645 const float halfFovRadians =
646 glm::radians(fov * 0.5f);
648 const float minimumDot =
649 std::cos(halfFovRadians);
652 std::max(perception.DetectionRadius, 0.0f);
654 const float radiusSquared = radius * radius;
656 for (
const auto& [targetHandle, targetData] : m_Entities)
658 if (targetHandle == handle)
664 if ((targetMask & perception.DetectionMask) == 0)
667 const glm::mat4 targetWorld =
670 const glm::vec3 targetPosition(targetWorld[3]);
672 const glm::vec3 offset =
673 targetPosition - observerPosition;
675 const float distanceSquared =
676 glm::dot(offset, offset);
678 if (distanceSquared > radiusSquared)
681 glm::vec3 horizontalOffset = offset;
682 horizontalOffset.y = 0.0f;
684 const float horizontalDistanceSquared =
685 glm::dot(horizontalOffset, horizontalOffset);
687 if (horizontalDistanceSquared > 0.000001f &&
690 const glm::vec3 directionToTarget =
692 std::sqrt(horizontalDistanceSquared);
695 glm::dot(forward, directionToTarget);
697 if (dot < minimumDot)
707 const std::uint64_t observerID = data.ID.ID;
708 const std::uint64_t targetID = targetData.ID.ID;
711 const float eyeHeight =
712 std::max(perception.EyeHeight, 0.0f);
714 const glm::vec3 eyePosition =
715 observerPosition + glm::vec3(0.0f, eyeHeight, 0.0f);
717 const glm::vec3 targetAimPosition =
718 targetPosition + glm::vec3(0.0f, eyeHeight, 0.0f);
720 const bool blocked = m_SpatialQuery->HasObstacleBetween(
731 auto& targetState = state.Targets[targetHandle];
733 targetState.EntityHandle = targetHandle;
734 targetState.LastKnownPosition = targetPosition;
735 state.LastSeenHandle = targetHandle;
736 state.LastSeenPosition = targetPosition;
737 state.LastSeenElapsed = 0.0f;
738 targetState.TimeSinceLastSeen = 0.0f;
739 targetState.IsVisible =
true;
750 if (!m_RuntimeRunning)
757 for (
auto& [handle, data] :
762 if (!data.Animator ||
763 !data.Animator->Playing ||
764 !data.Animator->Animation)
777 data.Animator->ClipIndex =
779 data.Animator->ClipIndex,
788 const float duration =
794 animator.TimeSeconds +=
798 if (duration > 0.0f &&
799 animator.TimeSeconds >
802 animator.TimeSeconds =
805 animator.TimeSeconds,
819 if (m_NavigationSystem)
823 const bool hasNavMesh =
824 m_NavigationSystem->HasNavMesh();
826 const std::uint64_t navMeshVersion =
827 m_NavigationSystem->GetNavMeshVersion();
829 for (
auto& [handle, data] : m_Entities)
834 auto& component = *data.NavAgent;
835 auto& state = m_NavAgentStates[handle];
837 state.Agent.Speed() =
838 std::max(component.Speed, 0.0f);
840 state.Agent.StoppingDistance() =
841 std::max(component.StoppingDistance, 0.0f);
843 if (!component.Enabled ||
844 !component.HasDestination)
847 state.HasRequestedDestination =
false;
848 state.PathQueryFailed =
false;
849 state.RepathTimer = 0.0f;
850 state.StuckTimer = 0.0f;
851 state.ProgressInitialized =
false;
855 Entity entity(handle,
this);
857 const glm::mat4 worldTransform =
860 const glm::vec3 currentPosition(
865 if (!state.ProgressInitialized)
867 state.LastProgressPosition = currentPosition;
868 state.ProgressInitialized =
true;
869 state.StuckTimer = 0.0f;
873 glm::vec3 progress = currentPosition - state.LastProgressPosition;
875 if (glm::dot(progress, progress) >= 0.15f * 0.15f)
877 state.LastProgressPosition = currentPosition;
878 state.StuckTimer = 0.0f;
882 state.StuckTimer += std::max(deltaTime, 0.0f);
889 if (state.StuckTimer >= 2.5f && component.Speed > 0.01f)
892 component.HasDestination =
false;
893 state.HasRequestedDestination =
false;
894 state.PathQueryFailed =
false;
895 state.StuckTimer = 0.0f;
896 state.ProgressInitialized =
false;
900 const bool destinationChanged =
901 !state.HasRequestedDestination ||
902 !NearlyEqualPosition(
903 state.RequestedDestination,
904 component.Destination);
906 const bool navMeshChanged =
907 state.PathNavMeshVersion != navMeshVersion;
913 state.PathQueryFailed =
true;
914 state.RepathTimer = 0.0f;
920 if (destinationChanged || navMeshChanged)
923 state.Agent.SetDestination(
926 component.Destination);
928 state.RequestedDestination =
929 component.Destination;
931 state.HasRequestedDestination =
true;
932 state.PathNavMeshVersion = navMeshVersion;
933 state.PathQueryFailed = !found;
934 state.RepathTimer = 0.0f;
935 state.LastProgressPosition = currentPosition;
936 state.StuckTimer = 0.0f;
937 state.ProgressInitialized =
true;
947 std::max(deltaTime, 0.0f);
949 if (state.RepathTimer >= std::max(component.RepathInterval, 0.05f))
951 state.RepathTimer = 0.0f;
953 if (state.PathQueryFailed)
956 state.Agent.SetDestination(
959 component.Destination);
961 state.PathQueryFailed = !found;
966 else if (!state.Agent.HasReachedDestination())
969 state.Agent.RecalculatePath(
979 state.PathQueryFailed =
true;
986 if (state.PathQueryFailed)
989 if (state.Agent.HasReachedDestination())
991 component.HasDestination =
false;
992 state.HasRequestedDestination =
false;
996 const glm::vec3 movement =
1001 if (glm::dot(movement, movement) > 0.0000001f)
1003 glm::mat4 movedWorld = worldTransform;
1005 glm::vec3 moveDirection = movement;
1006 moveDirection.y = 0.0f;
1008 const float moveLength = glm::length(moveDirection);
1009 if (moveLength > 0.0001f)
1011 moveDirection /= moveLength;
1014 glm::vec3 forward = -glm::vec3(worldTransform[2]);
1017 const float forwardLength = glm::length(forward);
1018 if (forwardLength > 0.0001f)
1020 forward /= forwardLength;
1022 const float dotValue = glm::clamp(
1023 glm::dot(forward, moveDirection),
1026 const float crossY =
1027 glm::cross(forward, moveDirection).y;
1029 const float angle = std::atan2(crossY, dotValue);
1030 const float maxRotation =
1031 glm::radians(360.0f) * std::max(deltaTime, 0.0f);
1033 const float rotationStep = glm::clamp(
1034 angle, -maxRotation, maxRotation);
1036 const glm::mat4 rotationDelta = glm::rotate(
1039 glm::vec3(0.0f, 1.0f, 0.0f));
1041 movedWorld = rotationDelta * worldTransform;
1047 worldTransform[3] + glm::vec4(movement, 0.0f);
1052 if (state.Agent.HasReachedDestination())
1054 component.HasDestination =
false;
1055 state.HasRequestedDestination =
false;
1063 UpdatePerception(deltaTime);
1069 for (
auto& [handle, data] :
1072 if (!data.ParticleSystem)
1076 *data.ParticleSystem;
1131 if (!settings.Playing)
1137 const bool emitting =
1149 settings.EmissionRate,
1152 state.SpawnAccumulator +=
1156 std::uint32_t spawnCount =
1159 state.SpawnAccumulator);
1161 state.SpawnAccumulator -=
1165 const glm::mat4 world =
1171 const glm::vec3 origin(
1174 glm::vec3 direction =
1197 state.Particles.size() <
1198 settings.MaxParticles)
1228 glm::vec3 spawnOffset{
1232 glm::vec3 spawnDirection =
1235 if (settings.Shape ==
1244 if (glm::length(r) <
1258 const float radius =
1307 const float radial =
1330 const float lifetimeScale =
1339 const float speedScale =
1348 const float sizeScale =
1363 settings.StartSpeed *
1384 settings.StartColor;
1402 for (
auto& [handle, data] :
1405 if (!data.AudioListener ||
1412 const glm::mat4 world =
1418 const glm::vec3 position(
1421 const glm::vec3 forward =
1426 const glm::vec3 up =
1439 for (
auto& [handle, data] :
1442 if (!data.AudioSource)
1445 const glm::mat4 world =
1464 std::vector<std::uint32_t>
1470 for (
const auto& [handle, data] :
1479 for (
const auto handle : handles)
1481 if (!
IsValid(handle))
continue;
1484 CreateScriptInstance(handle);
1485 auto it = m_ScriptInstances.find(handle);
1486 if (it == m_ScriptInstances.end())
continue;
1487 auto& data = m_Entities.at(handle);
1488 std::vector<NativeScriptComponent*> components;
1489 if (data.NativeScript && data.NativeScript->Enabled)
1490 components.push_back(&*data.NativeScript);
1491 for (
auto& script : data.AdditionalNativeScripts)
1492 if (script.Enabled) components.push_back(&script);
1493 bool bindingsChanged = components.size() != it->second.size();
1494 if (!bindingsChanged)
1495 for (std::size_t i = 0; i < components.size(); ++i)
1496 if (it->second[i]->m_BoundScript != components[i])
1497 { bindingsChanged =
true;
break; }
1498 if (bindingsChanged)
1500 DestroyScriptInstance(handle);
1501 CreateScriptInstance(handle);
1502 it = m_ScriptInstances.find(handle);
1503 if (it == m_ScriptInstances.end())
continue;
1506 for (std::size_t i = 0; i < components.size(); ++i)
1509 auto current = m_ScriptInstances.find(handle);
1510 if (current == m_ScriptInstances.end() || i >= current->second.size())
break;
1511 auto* instance = current->second[i].get();
1512 auto* component = components[i];
1513 if (!instance || !component)
continue;
1515 instance->OnUpdate(deltaTime);
1516 if (
IsValid(handle) && m_ScriptInstances.contains(handle))
1526 entity.m_Scene !=
this)
1548 std::vector<Entity> result;
1551 entity.m_Scene !=
this)
1556 for (
const auto handle :
1563 result.emplace_back(
1573 Entity possibleDescendant,
1576 if (!possibleDescendant ||
1582 std::uint32_t current =
1613 bool keepWorldTransform)
1617 child.m_Scene !=
this ||
1618 parent.m_Scene !=
this ||
1627 const glm::mat4 oldWorld =
1634 auto& childRelationship =
1638 if (childRelationship.Parent !=
1657 childRelationship.
Parent =
1675 if (keepWorldTransform)
1687 bool keepWorldTransform)
1690 child.m_Scene !=
this)
1695 auto& relationship =
1699 if (relationship.Parent == 0)
1702 const glm::mat4 oldWorld =
1710 relationship.Parent))
1725 relationship.Parent = 0;
1727 if (keepWorldTransform)
1731 TransformFromMatrix(
1740 entity.m_Scene !=
this)
1750 const glm::mat4 local =
1755 data.Relationship.Parent;
1774 const glm::mat4& worldTransform)
1777 entity.m_Scene !=
this)
1793 const glm::mat4 parentWorld =
1807 TransformFromMatrix(
Animation declarations for the Animation subsystem.
AudioEngine declarations for the Audio subsystem.
BTGameplay declarations for the Behavior Trees subsystem.
IspatialQuery declarations for the Perception subsystem.
Built-in gameplay scripts and neural agent examples.
NavigationSystem declarations for the Navigation subsystem.
Scene declarations for the Scenes and Native Scripting subsystem.
static bool Play(std::uint32_t entityHandle, const AudioSourceComponent &source, const glm::vec3 &position=glm::vec3(0.0f))
static void SetListener(const glm::vec3 &position, const glm::vec3 &forward, const glm::vec3 &up, const glm::vec3 &velocity=glm::vec3(0.0f))
static void Update(std::uint32_t entityHandle, const AudioSourceComponent &source, const glm::vec3 &position=glm::vec3(0.0f), const glm::vec3 &velocity=glm::vec3(0.0f))
bool HasCondition(std::string_view name) const
bool HasAction(std::string_view name) const
float & StoppingDistance()
std::optional< LastSeenTargetInfo > GetLastSeenTarget(std::uint32_t observerHandle) const
ScriptableEntity * FindRuntimeScript(std::uint32_t entityHandle, const std::string &scriptName) const
std::unique_ptr< Scene > Copy() const
std::vector< Entity > GetEntities()
bool SetParent(Entity child, Entity parent, bool keepWorldTransform=true)
glm::mat4 GetWorldTransform(Entity entity) const
bool IsDescendant(Entity possibleDescendant, Entity ancestor) const
void Unparent(Entity child, bool keepWorldTransform=true)
std::optional< AIDebugStateInfo > GetAIDebugState(std::uint32_t entityHandle) const
Entity GetParent(Entity entity)
void SetWorldTransform(Entity entity, const glm::mat4 &worldTransform)
const std::vector< RuntimeParticle > & GetParticles(std::uint32_t handle) const
std::vector< Entity > GetChildren(Entity entity)
Entity CreateEntity(const std::string &name="Entity")
void RegisterEntityBehaviorTreeBindings(std::uint32_t entityHandle, BTNativeRegistry ®istry) const
void OnUpdate(float deltaTime)
void DestroyEntity(Entity entity)
std::optional< BTDebugInfo > GetBehaviorTreeDebug(std::uint32_t entityHandle) const
bool IsValid(std::uint32_t handle) const
void RestoreFrom(const Scene &other)
std::vector< PerceptionTargetInfo > GetPerceivedTargets(std::uint32_t observerHandle) const
static void ApplyDefaults(NativeScriptComponent &component)
static const ScriptDefinition * Find(const std::string &name)
static void ReadFieldsFromInstance(NativeScriptComponent &component, const Script &instance)
static void ApplyFieldsToInstance(const NativeScriptComponent &component, Script &instance)
Base class for native gameplay scripts instantiated while a scene runs.
constexpr LayerMask Bit(std::uint32_t layer)
void RegisterBuiltinScripts()
void RegisterBTAssetAgent()
std::vector< std::uint32_t > Children
std::vector< Transition > History
std::vector< Event > Events
std::optional< glm::vec3 > TargetPosition
std::uint64_t BlackboardRevision
std::vector< BTBlackboard::DebugEntry > BlackboardEntries
std::optional< std::uint32_t > TargetHandle
std::vector< Node > Nodes
std::uint32_t EntityHandle
glm::vec3 LastKnownPosition