Replace usage of Utils.ExtractArrayFromList with Span
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace FlaxEngine
|
||||
{
|
||||
@@ -15,7 +16,7 @@ namespace FlaxEngine
|
||||
/// <param name="customActors">The custom set of actors to render. If empty, the loaded scenes will be rendered.</param>
|
||||
public static void DrawSceneDepth(GPUContext context, SceneRenderTask task, GPUTexture output, List<Actor> customActors)
|
||||
{
|
||||
var temp = Utils.ExtractArrayFromList(customActors);
|
||||
var temp = CollectionsMarshal.AsSpan(customActors).ToArray(); // FIXME
|
||||
var tempCount = temp.Length;
|
||||
Internal_DrawSceneDepth(FlaxEngine.Object.GetUnmanagedPtr(context), FlaxEngine.Object.GetUnmanagedPtr(task), FlaxEngine.Object.GetUnmanagedPtr(output), ref temp, ref tempCount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user