Add Level.GetActors and Level.GetScripts

This commit is contained in:
Wojtek Figat
2021-02-09 23:31:23 +01:00
parent b8420feed1
commit 73efa35008
3 changed files with 80 additions and 10 deletions

View File

@@ -377,6 +377,20 @@ public:
return (T*)FindScript(T::GetStaticClass());
}
/// <summary>
/// Finds all the actors 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>
/// <returns>Found actors list.</returns>
API_FUNCTION() static Array<Actor*> GetActors(const MClass* type);
/// <summary>
/// Finds all the scripts 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>
/// <returns>Found scripts list.</returns>
API_FUNCTION() static Array<Script*> GetScripts(const MClass* type);
/// <summary>
/// Tries to find scene with given ID.
/// </summary>