Earlier intialization for Unitask, depending on unity version
parent
c1042b32b7
commit
3121903fa3
|
@ -285,7 +285,11 @@ namespace Cysharp.Threading.Tasks
|
|||
return dest.ToArray();
|
||||
}
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)]
|
||||
#else
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
#endif
|
||||
static void Init()
|
||||
{
|
||||
// capture default(unity) sync-context.
|
||||
|
|
Loading…
Reference in New Issue