Skip to content

am1goo/FirebaseWebGL-Unity-UniTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase for Unity WebGL (UniTask Extensions)

Extensions for original Firebase for Unity WebGL package.

Features

  • callback-based API turned to be async/await API

Requirements

Installation

via Unity Package Manager

The latest version can be installed via package manager using following git URL:

https://github.com/am1goo/FirebaseWebGL-Unity-UniTask.git#0.9.0

How to use

Create a Firebase App

private FirebaseWebGL.FirebaseApp app;

void Awake()
{
    app = FirebaseWebGL.FirebaseApp.DefaultInstance();
}

Initialize installed modules

async UniTask InitializeAsync(CancellationToken cancellationToken)
{
    if (app.Analytics != null)
    {
        try
        {
            await app.Analytics.InitializeAsync(cancellationToken);
            Debug.Log($"Initialized: {isInitialized}");
        }
        catch (Exception ex)
        {
            Debug.LogException(ex);
        }
    }
}

Do what you want as same as you do it in official plugin (or kind of similar way)

.. .
... app.Analytics.LogEvent("my event");
.. .

Tested in

  • Unity 2020.3.x

Contribute

Contribution in any form is very welcome. Bugs, feature requests or feedback can be reported in form of Issues.

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages