AppRuntimesValidationStartup.cs 846 B

1234567891011121314151617181920
  1. using UnityEngine;
  2. // Included in the validation scene so the linker sees the actual public API path.
  3. public sealed class AppRuntimesValidationStartup : MonoBehaviour
  4. {
  5. private async void Start()
  6. {
  7. #if UNITY_IOS
  8. // Root every native entry point through IL2CPP without starting any purchases.
  9. System.GC.KeepAlive((System.Action)IAPWrapper.InitializeSK1);
  10. System.GC.KeepAlive((System.Action)IAPWrapper.InitializeSK2);
  11. System.GC.KeepAlive((System.Action)IAPWrapper.PurchaseConsumable);
  12. System.GC.KeepAlive((System.Action)IAPWrapper.PurchaseNonConsumable);
  13. System.GC.KeepAlive((System.Action)IAPWrapper.PurchaseSubscription);
  14. #endif
  15. Debug.Log(AppRuntimesStreamingAssets.GetPath("meta-logo.png"));
  16. AppRuntimes.Initialization();
  17. await AppRuntimes.CheckVersion();
  18. }
  19. }