diff --git a/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs b/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs index 2f466be17..8cbf6cf75 100644 --- a/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs +++ b/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs @@ -177,6 +177,7 @@ namespace FlaxEditor.Windows.Assets _toolstrip.AddSeparator(); _toolstrip.AddButton(Editor.Icons.Search64, Editor.ContentFinding.ShowSearch).LinkTooltip("Open content search tool (Ctrl+F)"); _toolstrip.AddButton(editor.Icons.CenterView64, _surface.ShowWholeGraph).LinkTooltip("Show whole graph"); + _toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/scripting/ai/behavior-trees/index.html")).LinkTooltip("See documentation to learn more"); // Debug behavior picker var behaviorPickerContainer = new ContainerControl(); @@ -301,6 +302,7 @@ namespace FlaxEditor.Windows.Assets if (blackboardType) { var blackboardInstance = blackboardType.CreateInstance(); + Utilities.Utils.InitDefaultValues(blackboardInstance); _knowledgePropertiesEditor.ReadOnly = true; _knowledgePropertiesEditor.Select(blackboardInstance); } diff --git a/Source/Engine/AI/Behavior.cpp b/Source/Engine/AI/Behavior.cpp index 8ec389469..a5b24fc8b 100644 --- a/Source/Engine/AI/Behavior.cpp +++ b/Source/Engine/AI/Behavior.cpp @@ -71,7 +71,6 @@ void BehaviorService::Dispose() Behavior::Behavior(const SpawnParams& params) : Script(params) { - _tickLateUpdate = 1; // TODO: run Behavior via Job System (use Engine::UpdateGraph) _knowledge.Behavior = this; Tree.Changed.Bind(this); } diff --git a/Source/Engine/AI/BehaviorTreeNodes.h b/Source/Engine/AI/BehaviorTreeNodes.h index 9ab32b8d8..d72bdee04 100644 --- a/Source/Engine/AI/BehaviorTreeNodes.h +++ b/Source/Engine/AI/BehaviorTreeNodes.h @@ -358,7 +358,7 @@ public: }; /// -/// Adds cooldown in between node executions. +/// Adds cooldown in between node executions. Blocks node execution for a given duration after last run. /// API_CLASS(Sealed) class FLAXENGINE_API BehaviorTreeCooldownDecorator : public BehaviorTreeDecorator { @@ -403,7 +403,7 @@ API_CLASS(Sealed) class FLAXENGINE_API BehaviorTreeKnowledgeConditionalDecorator API_FIELD(Attributes="EditorOrder(0)") BehaviorKnowledgeSelectorAny ValueA; - // The second value to use for comparision. + // The second value to use for comparision (constant). API_FIELD(Attributes="EditorOrder(10)") float ValueB = 0.0f; diff --git a/Source/Engine/Navigation/NavMesh.h b/Source/Engine/Navigation/NavMesh.h index 33fe27b7a..248dd2669 100644 --- a/Source/Engine/Navigation/NavMesh.h +++ b/Source/Engine/Navigation/NavMesh.h @@ -61,7 +61,7 @@ public: /// /// Gets the navmesh runtime object that matches with properties. /// - NavMeshRuntime* GetRuntime(bool createIfMissing = true) const; + API_FUNCTION() NavMeshRuntime* GetRuntime(bool createIfMissing = true) const; private: void AddTiles(); diff --git a/Source/Engine/Navigation/NavMeshRuntime.cpp b/Source/Engine/Navigation/NavMeshRuntime.cpp index 73122acff..989b1697f 100644 --- a/Source/Engine/Navigation/NavMeshRuntime.cpp +++ b/Source/Engine/Navigation/NavMeshRuntime.cpp @@ -26,7 +26,7 @@ namespace } NavMeshRuntime::NavMeshRuntime(const NavMeshProperties& properties) - : ScriptingObject(SpawnParams(Guid::Empty, NavMeshRuntime::TypeInitializer)) + : ScriptingObject(SpawnParams(Guid::New(), NavMeshRuntime::TypeInitializer)) , Properties(properties) { _navMesh = nullptr;