Minor tweaks

This commit is contained in:
Wojtek Figat
2023-09-25 11:00:49 +02:00
parent 626bdf2e37
commit b2ec235f01
5 changed files with 6 additions and 5 deletions

View File

@@ -177,6 +177,7 @@ namespace FlaxEditor.Windows.Assets
_toolstrip.AddSeparator(); _toolstrip.AddSeparator();
_toolstrip.AddButton(Editor.Icons.Search64, Editor.ContentFinding.ShowSearch).LinkTooltip("Open content search tool (Ctrl+F)"); _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.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 // Debug behavior picker
var behaviorPickerContainer = new ContainerControl(); var behaviorPickerContainer = new ContainerControl();
@@ -301,6 +302,7 @@ namespace FlaxEditor.Windows.Assets
if (blackboardType) if (blackboardType)
{ {
var blackboardInstance = blackboardType.CreateInstance(); var blackboardInstance = blackboardType.CreateInstance();
Utilities.Utils.InitDefaultValues(blackboardInstance);
_knowledgePropertiesEditor.ReadOnly = true; _knowledgePropertiesEditor.ReadOnly = true;
_knowledgePropertiesEditor.Select(blackboardInstance); _knowledgePropertiesEditor.Select(blackboardInstance);
} }

View File

@@ -71,7 +71,6 @@ void BehaviorService::Dispose()
Behavior::Behavior(const SpawnParams& params) Behavior::Behavior(const SpawnParams& params)
: Script(params) : Script(params)
{ {
_tickLateUpdate = 1; // TODO: run Behavior via Job System (use Engine::UpdateGraph)
_knowledge.Behavior = this; _knowledge.Behavior = this;
Tree.Changed.Bind<Behavior, &Behavior::ResetLogic>(this); Tree.Changed.Bind<Behavior, &Behavior::ResetLogic>(this);
} }

View File

@@ -358,7 +358,7 @@ public:
}; };
/// <summary> /// <summary>
/// Adds cooldown in between node executions. /// Adds cooldown in between node executions. Blocks node execution for a given duration after last run.
/// </summary> /// </summary>
API_CLASS(Sealed) class FLAXENGINE_API BehaviorTreeCooldownDecorator : public BehaviorTreeDecorator 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)") API_FIELD(Attributes="EditorOrder(0)")
BehaviorKnowledgeSelectorAny ValueA; BehaviorKnowledgeSelectorAny ValueA;
// The second value to use for comparision. // The second value to use for comparision (constant).
API_FIELD(Attributes="EditorOrder(10)") API_FIELD(Attributes="EditorOrder(10)")
float ValueB = 0.0f; float ValueB = 0.0f;

View File

@@ -61,7 +61,7 @@ public:
/// <summary> /// <summary>
/// Gets the navmesh runtime object that matches with properties. /// Gets the navmesh runtime object that matches with properties.
/// </summary> /// </summary>
NavMeshRuntime* GetRuntime(bool createIfMissing = true) const; API_FUNCTION() NavMeshRuntime* GetRuntime(bool createIfMissing = true) const;
private: private:
void AddTiles(); void AddTiles();

View File

@@ -26,7 +26,7 @@ namespace
} }
NavMeshRuntime::NavMeshRuntime(const NavMeshProperties& properties) NavMeshRuntime::NavMeshRuntime(const NavMeshProperties& properties)
: ScriptingObject(SpawnParams(Guid::Empty, NavMeshRuntime::TypeInitializer)) : ScriptingObject(SpawnParams(Guid::New(), NavMeshRuntime::TypeInitializer))
, Properties(properties) , Properties(properties)
{ {
_navMesh = nullptr; _navMesh = nullptr;