Add support for searching actors and scripts by interface

#3199
This commit is contained in:
Wojtek Figat
2025-02-11 14:22:44 +01:00
parent b0fe4373b0
commit 3ad369501a
4 changed files with 68 additions and 33 deletions

View File

@@ -360,7 +360,7 @@ public:
/// <summary>
/// Tries to find the actor of the given type in all the loaded scenes.
/// </summary>
/// <param name="type">Type of the actor to search for. Includes any actors derived from the type.</param>
/// <param name="type">Type of the actor to search for. Includes any actors derived from the type. Supports interface types.</param>
/// <param name="activeOnly">Finds only an active actor.</param>
/// <returns>Found actor or null.</returns>
API_FUNCTION() static Actor* FindActor(API_PARAM(Attributes="TypeReference(typeof(Actor))") const MClass* type, bool activeOnly = false);
@@ -368,7 +368,7 @@ public:
/// <summary>
/// Tries to find the actor of the given type and name in all the loaded scenes.
/// </summary>
/// <param name="type">Type of the actor to search for. Includes any actors derived from the type.</param>
/// <param name="type">Type of the actor to search for. Includes any actors derived from the type. Supports interface types.</param>
/// <param name="name">The name of the actor.</param>
/// <returns>Actor instance if found, null otherwise.</returns>
API_FUNCTION() static Actor* FindActor(API_PARAM(Attributes="TypeReference(typeof(Actor))") const MClass* type, const StringView& name);
@@ -385,7 +385,7 @@ public:
/// <summary>
/// Tries to find the actor of the given type and tag in all the loaded scenes.
/// </summary>
/// <param name="type">Type of the actor to search for. Includes any actors derived from the type.</param>
/// <param name="type">Type of the actor to search for. Includes any actors derived from the type. Supports interface types.</param>
/// <param name="tag">The tag of the actor to search for.</param>
/// <param name="activeOnly">Finds only an active actor.</param>
/// <param name="root">The custom root actor to start searching from (hierarchical), otherwise null to search all loaded scenes.</param>
@@ -446,7 +446,7 @@ public:
/// <summary>
/// Tries to find the script of the given type in all the loaded scenes.
/// </summary>
/// <param name="type">Type of the script to search for. Includes any scripts derived from the type.</param>
/// <param name="type">Type of the script to search for. Includes any scripts derived from the type. Supports interface types.</param>
/// <returns>Found script or null.</returns>
API_FUNCTION() static Script* FindScript(API_PARAM(Attributes="TypeReference(typeof(Script))") const MClass* type);