Skip to content

Commit

Permalink
[unity] change OnCompleted to UnsafeOnCompleted to avoid unity code s…
Browse files Browse the repository at this point in the history
…trip fix #966
  • Loading branch information
zombieyang committed Aug 31, 2022
1 parent 092a01d commit 9e862c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unity/Assets/Puerts/Runtime/Resources/puerts/csharp.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function setref(x, val) {

function taskToPromise(task) {
return new Promise((resolve, reject) => {
task.GetAwaiter().OnCompleted(() => {
task.GetAwaiter().UnsafeOnCompleted(() => {
let t = task;
task = undefined;
if (t.IsFaulted) {
Expand Down

0 comments on commit 9e862c9

Please sign in to comment.