Codestyle fixes
This commit is contained in:
@@ -109,6 +109,8 @@ namespace FlaxEngine
|
||||
public static T[] GetScripts<T>() where T : Script
|
||||
{
|
||||
var scripts = GetScripts(typeof(T));
|
||||
if (scripts.Length == 0)
|
||||
return Array.Empty<T>();
|
||||
var result = new T[scripts.Length];
|
||||
for (int i = 0; i < scripts.Length; i++)
|
||||
result[i] = scripts[i] as T;
|
||||
@@ -119,11 +121,13 @@ namespace FlaxEngine
|
||||
/// Finds all the actors of the given type in all the loaded scenes.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of the object.</typeparam>
|
||||
/// <typeparam name="activeOnly">Finds only active actors.</typeparam>
|
||||
/// <param name="activeOnly">Finds only active actors.</param>
|
||||
/// <returns>Found actors list.</returns>
|
||||
public static T[] GetActors<T>(bool activeOnly = false) where T : Actor
|
||||
{
|
||||
var actors = GetActors(typeof(T), activeOnly);
|
||||
if (actors.Length == 0)
|
||||
return Array.Empty<T>();
|
||||
var result = new T[actors.Length];
|
||||
for (int i = 0; i < actors.Length; i++)
|
||||
result[i] = actors[i] as T;
|
||||
|
||||
Reference in New Issue
Block a user