UniTaskVoid Start() shows incorrect signature warning
KichangKim opened this issue · 2 comments
KichangKim commented
When using UniTaskVoid for MonoBehaviour.Start(), VisualStudio shows incorrect signature warning like this:
Warning UNT0006 The Unity message 'Start' has an incorrect signature.
floriansimon1 commented
I don't think it's a bug. The return value should be void
.
Not related, but I saw your posts on the Unity forums about deadlocks when using Addressables. I'm seeing the same bug in my game, did you figure it out eventually?
hadashiA commented
This is because Unity does not officially support async of Start.
Unity calls Start dynamically and does not care about the return value.
If you are using UniTask and want Start to be async, use UniTaskVoid. (and ignore the warning).
If you don't do that, call FooAsync().Forget()
in void Start
.