-
-
Save yKimisaki/9fb2ffacbe64012fe1bbf2a983cac1b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using UniRx; | |
using UniRx.Async; | |
using UnityEngine; | |
namespace Minamo.Client.Core | |
{ | |
public class ApplicationEntryPoint | |
{ | |
private static UniTaskCompletionSource _source = new UniTaskCompletionSource(); | |
public static UniTask WaitInitializationAsync() => _source.Task; | |
[RuntimeInitializeOnLoadMethod] | |
private static void Main() | |
{ | |
MainCoreAsync().ConfigureAwait(PlayerLoopTiming.Update).Forget(); | |
} | |
private static UniTask MainCoreAsync() | |
{ | |
MessagePack.Resolvers.CompositeResolver.RegisterAndSetAsDefault | |
( | |
MessagePack.Resolvers.GeneratedResolver.Instance, | |
MessagePack.Resolvers.BuiltinResolver.Instance, | |
MessagePack.Resolvers.PrimitiveObjectResolver.Instance, | |
Resolvers.MagicOnionResolver.Instance | |
); | |
_source.TrySetResult(); | |
return UniTask.CompletedTask; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment