Skip to content

Commit

Permalink
removed Task.Run > to ensure the DataLoader (UnityWebRequest) is runn…
Browse files Browse the repository at this point in the history
…ing on the mainthread
  • Loading branch information
pfcDorn committed Jan 11, 2024
1 parent 562ab27 commit 632167d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Runtime/Scripts/GLTFSceneImporter.cs
Expand Up @@ -715,14 +715,7 @@ private async Task<GameObject> GetNode(int nodeId, CancellationToken cancellatio
var node = _gltfRoot.Nodes[nodeId];

cancellationToken.ThrowIfCancellationRequested();
if (!IsMultithreaded)
{
await ConstructBufferData(node, cancellationToken);
}
else
{
await Task.Run(() => ConstructBufferData(node, cancellationToken));
}
await ConstructBufferData(node, cancellationToken);

await ConstructNode(node, nodeId, cancellationToken);

Expand Down

0 comments on commit 632167d

Please sign in to comment.