[BUG; CRITICAL] Wrong assetReference.InstantiateAsync(parent).ToUniTask(cancellationToken: token) result
truenoob141 opened this issue · 3 comments
truenoob141 commented
I want to spawn 'TutorialMessageView' prefab via next code:
var go = await assetReference.InstantiateAsync(parent)
.ToUniTask(cancellationToken: token);
Debug.LogWarning($"Loaded {go.name}, Must be {typeof(T).Name}");
Result is wrong.
Native tasks work correctly:
var op = assetReference.InstantiateAsync(parent);
var go = await op.Task;
token.ThrowIfCancellationRequested();
Debug.LogWarning($"Loaded {go.name}, Must be {typeof(T).Name}");