Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unity: fix error when reloading a scene
Browse files Browse the repository at this point in the history
wgreenberg committed Jan 20, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 14f2a78 commit 9ac2852
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Common/Unity/AssetManager.ts
Original file line number Diff line number Diff line change
@@ -156,8 +156,10 @@ export class AssetFile {
this.waitForHeaderPromise = null;
}

public waitForHeader(): Promise<void> {
return assertExists(this.waitForHeaderPromise);
public async waitForHeader() {
if (this.waitForHeaderPromise !== null) {
await this.waitForHeaderPromise;
}
}

private async initFullInternal(dataFetcher: DataFetcher): Promise<void> {

0 comments on commit 9ac2852

Please sign in to comment.