Skip to content

Commit 9711ef8

Browse files
authored
Update documentation on cross-platform suppord
Update docs to reflect that KongregateWeb is now able to detect the presence of the Kongregate JavaScript API automatically.
1 parent c9582b6 commit 9711ef8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ The `KongregateWeb` class itself provides usage documentation for each of the fu
5858

5959
## Cross-Platform Support
6060

61-
The Kongregate API is only available when building for WebGL, and will only work correctly for a game that has been uploaded to the Kongregate website. Any attempts to access the API on other platforms will behave as if the API isn't ready (i.e. it will throw an exception).
62-
63-
As such, your game code will still need to be smart enough to not access `KongregateWeb` on non-web platforms (or when deployed to other websites), but you won't need to wrap your code in `#if UNITY_WEBGL`.
61+
The Kongregate API is only available when building for WebGL, and will only work correctly for a game that has been uploaded to the Kongregate website. When deploying your game to another website, or when testing builds locally, you can use `KongregateWeb.Status` to check the availability of the Kongregate JavaScript API. If you have not yet initialized the web API (by creating the `KongregateWeb` instance) it will return `ApiStatus.Uninitialized`. Once you have initialized the API, it will return `ApiStatus.IsReady` if the JavaScript API is present, or `ApiStatus.Unavailable` if initialization failed. `KongregateWeb.Ready` will also return `false` if the API is unavailable.
6462

6563
## Additional Resources
6664

6765
* [Kongregate Web API Guide](https://docs.kongregate.com/docs/javascript-api)
6866
* [Kongregate Web API Reference](https://docs.kongregate.com/v1.0/reference)
69-
* [Unity WebGL Template Reference](https://docs.unity3d.com/Manual/webgl-templates.html)
67+
* [Unity WebGL Template Reference](https://docs.unity3d.com/Manual/webgl-templates.html)

0 commit comments

Comments
 (0)