Kongregate Web
Bindings to the Kongregate JavaScript API for Unity.
com.kongregate.kongregate-web 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/kongregate-web.git?path=com.kongregate.kongregate-web README Markdown
Copy this to your project's README.md
## Installation
Add **Kongregate Web** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/kongregate-web.git?path=com.kongregate.kongregate-web
```
[](https://www.pkglnk.dev/pkg/kongregate-web)README
Kongregate Web API for Unity
This package provides C# bindings to the Kongregate Web API to be used in developing Unity games that will be published on the Kongregate website.
KongregateWeb.BecameReady += () =>
{
if (KongregateWeb.IsGuest)
{
Debug.Log("Player is a guest");
}
else
{
Debug.Log("Player is logged in as " + KongregateWeb.Username);
}
};
KongregateWeb.LoggedIn += () =>
{
Debug.Log("Player is logged in as " + KongregateWeb.Username);
};
Setup and Usage
To include kongregate-web as a Unity package, you'll need to be on Unity 2018.3 or later. kongregate-web is hosted on OpenUPM. Follow the OpenUPM getting started guide if you're not already using it, then run the following command from within your Unity project:
openupm add com.kongregate.kongregate-web
Alternate setup instructions are also available on the docs site.
Once you have added the package to your project you'll also need to setup a custom WebGL template to make the Kongregate JavaScript API available to your game.
No comments yet. Be the first!