Skip to content

finikigames/RuStore-unity-async

Repository files navigation

Task/UniTask extension for RuStore Unity billing plugin

Badges

MIT License Downloads

Async Types

Plugin provides two API's to call async methods:

  1. Task
  2. UniTask

Task vesion available as is. To use UniTask extension, you need to define Scripting Define Symbols
RUSTORE_UNITASK
and import UniTask plugin to your project. How to add Scripting Define Symbols

Install

You can add https://github.com/finikigames/RuStore-unity-async.git to Package Manager

image

or add "com.finikigames.rustore-async-extension": "https://github.com/finikigames/RuStore-unity-async.git" to Packages/manifest.json.

Usage/Examples

var result = await RuStoreBillingClient.Instance.PurchaseProductAsync(itemId);

All methods return RuStoreApiResult struct:

 public struct RuStoreApiResult<T> {
        public RuStoreError Error;
        public T Result;
        public bool HasError;
    }

To use extensions just write await in front of your method call, remove stupid callbacks and add Async to the method name. That's all :)

About

Async api for rustore unity billing plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages