diff --git a/AssetStore~/README.md b/AssetStore~/README.md index ae307fc..d5b290f 100644 --- a/AssetStore~/README.md +++ b/AssetStore~/README.md @@ -29,8 +29,17 @@ package itself still supports 2021.3, so list that as the lowest version. choose `Assets/Hibira`, run the validator, and upload. 6. In the [Publisher Portal](https://publisher.unity.com/packages), fill in the draft with the text and images below, set the price to Free, and submit. - The publisher profile needs a Website (https://hibira.io) or the submit is - refused. + The publisher profile needs a Website or the submit is refused. Use + https://hibira.io: its landing page has no Buy Now or Add to Cart buttons + and no links to other marketplaces (Asset Store Content Transparency 1.7.2); + keep it that way. +7. Hibira is an online service that needs an account, so the product must be + registered as a Verified Solution at https://create.unity.com/contact-vs + before the Asset Store accepts it. The package itself must keep having no + feature limits, license checks or DRM. + +Every upload needs `Third-Party Notices.txt` in the package (build.py adds it) +and the third-party line in the description below. ## Later releases @@ -84,6 +93,8 @@ Play mode would make a good fourth screenshot once one is taken in the Editor. **Supported Unity versions:** 2021.3 and later +**Publisher website:** https://hibira.io + **Keywords:** multiplayer, realtime, websocket, lobby, matchmaking, presence, chat, webgl, pusher, networking **Summary (short description):** @@ -122,7 +133,9 @@ Documentation and source: https://github.com/hibira-io/unity • Plain C#, one assembly (Hibira.Realtime); no native plugins apart from a WebGL .jslib • Source code included • Documentation: Documentation/README.md in the package, and online at https://github.com/hibira-io/unity -• License: MIT. The Asset Store EULA applies to the Asset Store copy, and the same code is also available under MIT on GitHub. +• License: the Asset Store EULA applies to this copy. The same source is also published under the MIT License on GitHub. + +Third-party software: this package includes no third-party components. It uses its own JSON code and the WebSocket support built into .NET and the browser; see Third-Party Notices.txt in the package for details. If the package is already installed from git through the Package Manager, remove that copy before importing this one. @@ -130,4 +143,4 @@ If the package is already installed from git through the Package Manager, remove ## 中文摘要 -這裡是把 Hibira Realtime 上架 Unity Asset Store(免費)所需的全部材料:`export.sh` 把套件複製成 Asset Store 要求的 `Assets/Hibira/Realtime` 結構;`images/` 有 icon、card、cover、social 圖與三張截圖,尺寸都符合 Publisher Portal 的要求;上方是可直接貼上的英文上架文案。上傳需要 Unity 2022.3 以上(套件本身仍支援 2021.3)。之後每次打 `v*` tag,CI 會用 `build.py` 直接產生 `.unitypackage` 並附到 GitHub Release,不需要 Unity 授權;只要在 Uploader 選 From .unitypackage 上傳,再到 Publisher Portal 送審。首次流程:開一個 Unity 2022.3 空專案,執行 `export.sh`,在 Editor 用 Asset Store Publishing Tools 上傳 `Assets/Hibira`,再到 Publisher Portal 填文案、上傳圖片並送審。上傳與送審需要在 Unity Editor 與 Publisher Portal 登入,只能由帳號擁有者操作。 +這裡是把 Hibira Realtime 上架 Unity Asset Store(免費)所需的全部材料:`export.sh` 把套件複製成 Asset Store 要求的 `Assets/Hibira/Realtime` 結構;`images/` 有 icon、card、cover、social 圖與三張截圖,尺寸都符合 Publisher Portal 的要求;上方是可直接貼上的英文上架文案。上傳需要 Unity 2022.3 以上(套件本身仍支援 2021.3)。之後每次打 `v*` tag,CI 會用 `build.py` 直接產生 `.unitypackage` 並附到 GitHub Release,不需要 Unity 授權;只要在 Uploader 選 From .unitypackage 上傳,再到 Publisher Portal 送審。首次流程:開一個 Unity 2022.3 空專案,執行 `export.sh`,在 Editor 用 Asset Store Publishing Tools 上傳 `Assets/Hibira`,再到 Publisher Portal 填文案、上傳圖片並送審。上傳與送審需要在 Unity Editor 與 Publisher Portal 登入,只能由帳號擁有者操作。套件內含 `Third-Party Notices.txt`(說明沒有第三方元件),描述末尾要保留對應的第三方授權說明;Asset Store 版不附 MIT LICENSE(改由 Asset Store EULA 涵蓋)。Hibira 是需要註冊帳號的線上服務,必須先在 https://create.unity.com/contact-vs 登記為 Verified Solution;套件本身不得有功能限制或 DRM。Publisher 網站用 https://hibira.io,首頁不能有購買按鈕或其他市集的連結。 diff --git a/AssetStore~/build.py b/AssetStore~/build.py index f8a0c39..6d778b0 100755 --- a/AssetStore~/build.py +++ b/AssetStore~/build.py @@ -7,7 +7,13 @@ Both outputs use the classic Asset Store layout: - Assets/Hibira/Realtime/{Runtime,Samples/Lobby,Documentation,CHANGELOG.md,LICENSE} + Assets/Hibira/Realtime/{Runtime,Samples/Lobby,Documentation,CHANGELOG.md,Third-Party Notices.txt} + +The MIT LICENSE stays out of the Asset Store copy, which the Asset Store EULA +covers; Third-Party Notices.txt says the same source is MIT on GitHub. The +README copied into Documentation drops its image lines (the cover and the CI +badge), which point at files that are not in the package, and its License +section names the EULA instead of linking the LICENSE file. Files that already have a .meta in this repository (everything under Runtime) keep it. The rest (samples, docs, changelog, licence, and the folders above @@ -31,6 +37,12 @@ ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PREFIX = "Assets/Hibira/Realtime" +NOTICES = "Third-Party Notices.txt" +ASSET_STORE_LICENSE = ( + "This copy is licensed under the Unity Asset Store EULA. The same source is also " + "published under the MIT License at https://github.com/hibira-io/unity. " + "See Third-Party Notices.txt." +) def load_templates(): @@ -63,7 +75,22 @@ def tree(src, dest): yield os.path.join(ROOT, "Documentation~", f), PREFIX + "/Documentation/" + f yield os.path.join(ROOT, "README.md"), PREFIX + "/Documentation/README.md" yield os.path.join(ROOT, "CHANGELOG.md"), PREFIX + "/CHANGELOG.md" - yield os.path.join(ROOT, "LICENSE"), PREFIX + "/LICENSE" + yield os.path.join(ROOT, NOTICES), PREFIX + "/" + NOTICES + + +def read_asset(src, asset_path): + """The bytes that go into the package for this file.""" + with open(src, "rb") as f: + data = f.read() + if asset_path == PREFIX + "/Documentation/README.md": + lines = data.decode("utf-8").split("\n") + kept = [l for l in lines if not l.lstrip().startswith(("![", "[!["))] + text = "\n".join(kept) + text = text.replace("[MIT](LICENSE).", ASSET_STORE_LICENSE) + while "\n\n\n" in text: + text = text.replace("\n\n\n", "\n\n") + data = text.encode("utf-8") + return data def repo_meta(src_path): @@ -128,8 +155,7 @@ def write_unitypackage(path): for asset_path, src, meta in entries(): guid = guid_of(meta) if src is not None: - with open(src, "rb") as f: - add_bytes(tar, guid + "/asset", f.read()) + add_bytes(tar, guid + "/asset", read_asset(src, asset_path)) add_bytes(tar, guid + "/asset.meta", meta.encode()) add_bytes(tar, guid + "/pathname", asset_path.encode()) with open(path, "wb") as f: @@ -147,7 +173,8 @@ def write_project(project): os.makedirs(dest, exist_ok=True) else: os.makedirs(os.path.dirname(dest), exist_ok=True) - shutil.copyfile(src, dest) + with open(dest, "wb") as f: + f.write(read_asset(src, asset_path)) with open(dest + ".meta", "w", encoding="utf-8", newline="\n") as f: f.write(meta) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4169788..0dc0e07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.3.1 + +- Asset Store copy: adds `Third-Party Notices.txt` (the package has no + third-party components) and is covered by the Asset Store EULA instead of + shipping the MIT `LICENSE` file; the same source stays MIT on GitHub. The + bundled README no longer points at images that are not in the package. + ## 0.3.0 - `HibiraAuctionHouse`: follows an auction house published by diff --git a/Third-Party Notices.txt b/Third-Party Notices.txt new file mode 100644 index 0000000..f2591a4 --- /dev/null +++ b/Third-Party Notices.txt @@ -0,0 +1,50 @@ +Hibira Realtime - Third-Party Notices +===================================== + +This file lists the third-party components included in this package and the +licenses they are used under. + +Third-party components included +------------------------------- + +None. + +Every file in this package (C# scripts, the WebGL .jslib plugin, the assembly +definitions, the Lobby sample and the documentation) was written by Hibira. +The package contains no third-party code, libraries, fonts, images, audio, +models or other media. + +- JSON: the package uses its own JSON reader and writer (Runtime/Json.cs); + no third-party JSON library is included. +- WebSocket: native platforms use System.Net.WebSockets.ClientWebSocket from + the .NET runtime that ships with Unity, and WebGL builds use the browser's + built-in WebSocket API through Runtime/Plugins/WebGL/HibiraWebSocket.jslib. + No third-party WebSocket library is included. +- HTTP: auth requests use Unity's UnityWebRequest. + +The package depends on no other Unity packages. + +Online service +-------------- + +The package is a client for Hibira (https://hibira.io), a hosted realtime +service, and for other servers that implement the Pusher Channels protocol. +Using it with Hibira needs a Hibira account; the Free plan is enough to build +and test. The package itself has no feature limits, license checks or DRM: +every feature works the same whatever the account's plan. + +Trademarks +---------- + +"Pusher" and "Pusher Channels" are trademarks of their owner, and "Photon" and +"PUN" are trademarks of Exit Games. They are named only to describe protocol +compatibility and to help users move existing projects. This package includes +no code from those products and is not affiliated with or endorsed by their +owners. + +License of this package +----------------------- + +The Asset Store copy of this package is licensed under the Unity Asset Store +EULA. The same source code is also published by Hibira under the MIT License +at https://github.com/hibira-io/unity. diff --git a/Third-Party Notices.txt.meta b/Third-Party Notices.txt.meta new file mode 100644 index 0000000..2d4f50d --- /dev/null +++ b/Third-Party Notices.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b5adf0a634ef1d577631e8b74c5ed565 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package.json b/package.json index 793ae44..b30950b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "io.hibira.realtime", - "version": "0.3.0", + "version": "0.3.1", "displayName": "Hibira Realtime", "description": "Realtime WebSocket channels for Unity on Hibira and other Pusher-compatible servers: public, private and presence channels, client events, game rooms (seats, host, ready, chat) and a matchmaking queue, shared with @hibira-io/lobby browser players, and an auction house that follows @hibira-io/auction. Works in WebGL builds.", "unity": "2021.3",