cs-util-com / cscore

cscore is a minimal-footprint library providing commonly used helpers & patterns for your C# projects. It can be used in both pure C# and Unity projects.
https://cs-util-com.github.io/cscore/
Apache License 2.0
183 stars 31 forks source link

Add Browser-specific functionality for WebGL builds #96

Closed HtoTheB closed 1 year ago

HtoTheB commented 1 year ago

In this MR we propose a new cscore module that includes functionality specific to WebGL builds.

Browsers have a lot of functionality that is not present in a traditional app deployment. Some of that functionality has been exposed by Unity, but a lot of browser essentials are still missing.

This first draft introduces a way to send alerts to the browser. It also offers a way to open a popup to prevent the user from closing a browser window (this can also be used to be notified about the users intention to close a tab and save all relevant information prior to that).

We intend to extent the module with more functionality:

Also we fixed some typos, removed obsolete WebGL templates & added dependencies to the cscoreUnity packages without whom it won't compile.

We're open to feedback :)

Implements: https://github.com/cs-util-com/cscore/issues/88


This change is Reviewable

codeclimate[bot] commented 1 year ago

Code Climate has analyzed commit df8cc267 and detected 0 issues on this pull request.

View more on Code Climate.