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
Add AsyncInstantiate support #548
base: master
Are you sure you want to change the base?
Conversation
What is |
AsyncInstantiateOperation was added since Unity 2022.3.20 / 2023.3.0b7: I didn't find a define like UNITY_2022_3_20_OR_NEWER to restrict the methods. |
Unity doesn't add new APIs in patch versions. It was added in 2022.3.0, so you can use UNITY_2022_3_OR_NEWER. https://docs.unity3d.com/2023.3/Documentation/ScriptReference/AsyncInstantiateOperation_1.html |
Unity 2022.3.19f1 does not support this API. It was added in a patch version (https://unity.com/releases/editor/whats-new/2022.3.20). |
Oh I missed it in the notes because of the weird formatting. |
There is a new define in 2022.3.20f1 that can be used instead of #if UNITASK_ASYNCINSTANTIATE_SUPPORT: I assume it's supposed to be #if UNITY_2022_3_20_OR_NEWER, but we'll know for sure once 2022.3.21f1 comes out. |
I've come up with the following define. It's not elegant but it does what you want. // 2022.3.20f1 or newer
#if UNITY_2022_3_OR_NEWER && !(UNITY_2022_3_0 || UNITY_2022_3_1 || UNITY_2022_3_2 || UNITY_2022_3_3 || UNITY_2022_3_4 || UNITY_2022_3_5 || UNITY_2022_3_6 || UNITY_2022_3_7 || UNITY_2022_3_8 || UNITY_2022_3_9 || UNITY_2022_3_10 || UNITY_2022_3_11 || UNITY_2022_3_12 || UNITY_2022_3_13 || UNITY_2022_3_14 || UNITY_2022_3_15 || UNITY_2022_3_16 || UNITY_2022_3_17 || UNITY_2022_3_18 || UNITY_2022_3_19) |
is there any progress? we need it |
https://docs.unity3d.com/2023.3/Documentation/ScriptReference/AsyncInstantiateOperation_1.html