Merge branch 'commandSuggestionImprovements' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-commandSuggestionImprovements

This commit is contained in:
Wojtek Figat
2025-09-22 18:06:55 +02:00
3 changed files with 45 additions and 4 deletions

View File

@@ -435,6 +435,17 @@ void DebugCommands::InitAsync()
AsyncTask = Task::StartNew(InitCommands);
}
void DebugCommands::GetAllCommands(Array<StringView>& commands)
{
EnsureInited();
ScopeLock lock(Locker);
for (auto& command : Commands)
{
commands.Add(command.Name);
}
}
DebugCommands::CommandFlags DebugCommands::GetCommandFlags(StringView command)
{
CommandFlags result = CommandFlags::None;

View File

@@ -46,6 +46,12 @@ public:
/// </summary>
API_FUNCTION() static void InitAsync();
/// <summary>
/// Gets all available commands.
/// </summary>
/// <param name="matches">The output list of all commands (unsorted).</param>
API_FUNCTION() static void GetAllCommands(API_PARAM(Out) Array<StringView, HeapAllocation>& commands);
/// <summary>
/// Returns flags of the command.
/// </summary>