Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with unity 6 #718

Open
shaked-okami opened this issue Nov 5, 2024 · 2 comments
Open

Integration with unity 6 #718

shaked-okami opened this issue Nov 5, 2024 · 2 comments

Comments

@shaked-okami
Copy link

I love VContainer.
That is why i am wondering is there any chance to integrate unity 6 new awaitable system in VContainer.
This is mainly a problem with the StartAsync that returns a UniTask rather then a Task.
Are there any plans to integrate this?

@shaked-okami
Copy link
Author

Plus looking at the source code, this should be a relative easy solution, since we only need to add a new interface that would return a task

@hadashiA
Copy link
Owner

I've checked.
https://github.com/hadashiA/VContainer/blob/master/VContainer/Assets/VContainer/Runtime/Annotations/IAsyncStartable.cs

If you are using Unity 2023.1 or later, StartAsync is available by default with a return value of UnityEngine.Awaitalble.

If UniTask is installed, UniTask will take precedence.
( Better functionally and performance-wise )

(Also, whatever the return value is you can use Awaitable within the async method.

I thought this worked fine, what changes would you like me to make to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants