async sample code has a bug
See original GitHub issueusing System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Siccity.GLTFUtility;
public class ModelLoader : MonoBehaviour
{
public string filename;
public void OnLoadTest()
{
ImportGLTFAsync(filename);
}
void ImportGLTFAsync(string filepath) {
Importer.ImportGLTFAsync(filepath, new ImportSettings(), OnFinishAsync);
}
void OnFinishAsync(GameObject result) {
Debug.Log("Finished importing " + result.name);
}
}
OnFinishAsync will redline in VSCode and Unity (line 13)
Is there a way to correct the third part of Importer.ImportGLTFAsync() to fix this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
async and await C# - Bug? [closed]
The difference is that the code below kicks off both asynchronous actions and then starts waiting. So they both execute in parallel and...
Read more >Hard lessons in asynchronous JavaScript code - Scrum Bug
LESSON: Testing these kinds of async patterns is hard. You'll need to change the way you write your code if you want to...
Read more >The Heisenbug lurking in your async code - Textual
If you have ever used asyncio.create_task you may have created a bug for yourself that is challenging (read almost impossible) to reproduce.
Read more >A Heisenbug lurking in async Python
This is a great blog post. Concise, lacking fluff or extraneous prose, it gets right to the point, presents the primary-source reference and...
Read more >Async code undebuggable, async exceptions don't let me ...
Irrelevant library code is shown. Clicking "show execution point" does nothing, jumping to the mysqlconnector library source is not helpful.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try adding
, AnimationClip[] animations
to OnFinishAsync paramersThis worked for me. Maybe change the code on the readme file?