Add BehaviorKnowledgeSelector for Behavior Knowledge unified data access

This commit is contained in:
Wojtek Figat
2023-08-19 19:50:17 +02:00
parent dee2f11ae4
commit eee53dfbdc
12 changed files with 775 additions and 43 deletions

View File

@@ -51,4 +51,22 @@ API_CLASS() class FLAXENGINE_API BehaviorKnowledge : public ScriptingObject
/// Releases the memory of the knowledge.
/// </summary>
void FreeMemory();
/// <summary>
/// Gets the knowledge item value via selector path.
/// </summary>
/// <seealso cref="BehaviorKnowledgeSelector{T}"/>
/// <param name="path">Selector path.</param>
/// <param name="value">Result value (valid only when returned true).</param>
/// <returns>True if got value, otherwise false.</returns>
API_FUNCTION() bool Get(const StringAnsiView& path, API_PARAM(Out) Variant& value);
/// <summary>
/// Sets the knowledge item value via selector path.
/// </summary>
/// <seealso cref="BehaviorKnowledgeSelector{T}"/>
/// <param name="path">Selector path.</param>
/// <param name="value">Value to set.</param>
/// <returns>True if set value, otherwise false.</returns>
API_FUNCTION() bool Set(const StringAnsiView& path, const Variant& value);
};