question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

async sample code has a bug

See original GitHub issue
using 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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Siccitycommented, May 10, 2020

Try adding , AnimationClip[] animations to OnFinishAsync paramers

1reaction
Thebinomancommented, Jul 11, 2021

, AnimationClip[] animations

This worked for me. Maybe change the code on the readme file?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found