com.robotsquid.squidhub 0.5.9 → 0.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.12
4
+
5
+ **A manifest change is a new version now — the platform changed underneath this.**
6
+
7
+ Editing `manifest.json` and re-uploading used to report "these exact bytes are
8
+ already published, nothing to upload" and discard the edit. Server migration
9
+ 0029 makes version identity `(build_hash, manifest_sha256)`, so a changed
10
+ declaration registers a new version and takes effect.
11
+
12
+ ⚠️ **`manifest.json` is still excluded from the build hash and must be** — it
13
+ CONTAINS that hash, so folding it in has no fixed point. A separate digest of
14
+ the manifest file has no such circularity, because a manifest never contains its
15
+ own digest. The bytes are still deduped: two versions differing only in
16
+ declaration share one copy in R2.
17
+
18
+ ⚠️ **The 0.5.11 "your manifest was ignored" explanation is GONE**, because it is
19
+ now false. That message fired when the bytes matched; the bytes matching now
20
+ also means the manifest matched. Telling a publisher their edit was discarded at
21
+ the one moment we know it was not is worse than saying nothing.
22
+
23
+ **Requires the api deployed with migration 0029.** Against an older server this
24
+ package still works and a manifest-only change still silently does nothing.
25
+
26
+ ## 0.5.11
27
+
28
+ **"Nothing to upload" now says what it did to your manifest.**
29
+
30
+ Editing `manifest.json` and pressing Build and Upload reported *"These exact
31
+ bytes are already published. Nothing to upload."* and stopped — never mentioning
32
+ that the declaration had not been applied. With a manifest editor in the package
33
+ that is a normal thing to do, and the result was unreadable.
34
+
35
+ `manifest.json` is excluded from the build hash — it CONTAINS that hash, so
36
+ including it would have no fixed point — so a build whose only difference is its
37
+ declaration hashes identically and matches a version already registered.
38
+
39
+ ⚠️ **It stops at `start`, before a byte moves, which is EARLIER than the
40
+ server's own `manifest-ignored` warning.** That one is raised at `complete`, and
41
+ such a build never gets there, so this message is the only thing that will ever
42
+ say it.
43
+
44
+ The dialog now names the manifest and both ways forward: change a real file and
45
+ rebuild, or set the override in the publisher console — display settings are
46
+ live-tunable there and need no new build at all.
47
+
48
+ ## 0.5.10
49
+
50
+ **Fullscreen: the check that makes it actually work.**
51
+
52
+ `Check WebGL Settings` and every build now warn when **Run In Background** is
53
+ off. Unity WebGL pauses its main loop when the canvas loses focus, and on
54
+ SquidHub every control the player can see — mute, fullscreen, the back link —
55
+ belongs to the PORTAL, in the parent document. Clicking one takes focus off the
56
+ canvas and stops the game.
57
+
58
+ ⚠️ **Fullscreen is where it shows, and the pause is invisible.** The portal
59
+ fullscreens its own container, the frame gets bigger and the canvas CSS box
60
+ grows — but the engine loop is what syncs the WebGL render target to that box.
61
+ A paused game keeps drawing at the old resolution and is upscaled across the
62
+ whole screen. Measured: a 2560x1290 frame still rendering a 1800x1120 target,
63
+ unchanged after 24 seconds, correct within two seconds of a real click into the
64
+ game. A player sees a blurry game that sharpens when they touch it, which nobody
65
+ ever reports as a focus bug.
66
+
67
+ ⚠️ **A warning, not fatal.** The build runs, and a game that is genuinely
68
+ unplayable unfocused is entitled to pause. It is the wrong default here, not an
69
+ impossibility.
70
+
71
+ **And the button only exists if you declare it.** `display.fullscreen` defaults
72
+ to false, so the portal draws no fullscreen control at all until the manifest
73
+ opts in — tick **Fullscreen button** in `SquidHub → Game Manifest…`. That is
74
+ separate from this check, and both are needed.
75
+
3
76
  ## 0.5.9
4
77
 
5
78
  **Build and Upload just uploads.** The "Upload N files (X MB)?" confirmation is
@@ -38,6 +38,7 @@ namespace SquidHub.Editor
38
38
  CheckJslib(findings);
39
39
  CheckThreads(findings);
40
40
  CheckCompression(findings);
41
+ CheckRunInBackground(findings);
41
42
 
42
43
  return findings;
43
44
  }
@@ -106,6 +107,41 @@ namespace SquidHub.Editor
106
107
  "Player Settings > Publishing Settings > Compression Format to Disabled.");
107
108
  }
108
109
 
110
+ /// <summary>
111
+ /// ⚠️ Unity WebGL PAUSES ITS MAIN LOOP when the canvas loses focus, and on
112
+ /// this platform the canvas loses focus constantly: every control the
113
+ /// player can see — mute, fullscreen, the back link — belongs to the
114
+ /// PORTAL, in the parent document, not to the game. Clicking any of them
115
+ /// takes focus off the canvas and stops the game.
116
+ ///
117
+ /// ⚠️ The worst of it is fullscreen, because the pause is invisible. The
118
+ /// portal fullscreens its own container, the frame gets bigger, and the
119
+ /// canvas CSS box grows — but the engine loop is what syncs the WebGL
120
+ /// render target to that box, so a paused game keeps rendering at the old
121
+ /// resolution and is upscaled across the whole screen. Measured here: a
122
+ /// 2560x1290 frame still drawing a 1800x1120 target, unchanged after 24
123
+ /// seconds, and correct within two seconds of a real click into the game.
124
+ /// The player sees a blurry game that sharpens when they touch it, which
125
+ /// nobody reports as a focus bug.
126
+ ///
127
+ /// ⚠️ A WARNING, not fatal. The build runs, and a game that is genuinely
128
+ /// unplayable unfocused — a turn-based puzzle, say — is entitled to
129
+ /// pause. It is the wrong default here, not an impossibility.
130
+ /// </summary>
131
+ private static void CheckRunInBackground(List<Finding> findings)
132
+ {
133
+ if (PlayerSettings.runInBackground) return;
134
+
135
+ Warn(findings,
136
+ "Run In Background is off (Player Settings > Resolution and Presentation). " +
137
+ "Unity WebGL pauses when the canvas loses focus, and on SquidHub every visible " +
138
+ "control belongs to the portal rather than to the game — so the mute and " +
139
+ "fullscreen buttons stop the game as a side effect of being clicked. " +
140
+ "Fullscreen is the one that shows: the frame grows, the paused engine never " +
141
+ "resizes its render target to match, and the game is upscaled and blurry until " +
142
+ "the player clicks into it. Turn it on.");
143
+ }
144
+
109
145
  private static bool AllowsThreads()
110
146
  {
111
147
  var defines = PlayerSettings.GetScriptingDefineSymbols(NamedBuildTarget.WebGL);
@@ -186,9 +186,26 @@ namespace SquidHub.Editor
186
186
  if (SquidHubBuildScan.JsonField(startResponse, "alreadyPublished") == "true")
187
187
  {
188
188
  EditorUtility.ClearProgressBar();
189
+
190
+ // ⚠️ A no-op now means the BYTES AND THE DECLARATION both match.
191
+ // It used to mean only the bytes did, so a changed manifest.json
192
+ // landed here and was discarded — this dialog carried a long
193
+ // explanation of that trap. Migration 0029 made version identity
194
+ // (build_hash, manifest_sha256), so a declaration change
195
+ // registers a new version and never reaches this branch.
196
+ //
197
+ // ⚠️ Do NOT reinstate the old wording. Telling a publisher their
198
+ // manifest was ignored, at the one moment we know it was not, is
199
+ // worse than saying nothing.
200
+ var hash = SquidHubBuildScan.JsonField(startResponse, "buildHash");
201
+ Debug.Log("[SquidHub] " + hash + " is already published — same bytes, same " +
202
+ "manifest. Nothing to upload.");
203
+
189
204
  EditorUtility.DisplayDialog("SquidHub",
190
- "These exact bytes are already published as " + SquidHubBuildScan.JsonField(startResponse, "buildHash") +
191
- ". Nothing to upload.", "OK");
205
+ "Already published as " + hash + ".\n\n" +
206
+ "Nothing to upload: both the build and its manifest.json match what is " +
207
+ "already registered.",
208
+ "OK");
192
209
  yield break;
193
210
  }
194
211
 
package/README.md CHANGED
@@ -175,6 +175,7 @@ The package checks these for you, but for reference:
175
175
  | Setting | Value | Why |
176
176
  |---|---|---|
177
177
  | Native C/C++ Multithreading | **off** | SquidHub's default tier is not cross-origin isolated, so `SharedArrayBuffer` does not exist. A pthreads build cannot start. Ask about the isolated tier if you genuinely need threads — it carries no ads |
178
+ | Run In Background | **on** | ⚠️ Unity WebGL pauses when the canvas loses focus, and every control on SquidHub — mute, fullscreen, back — belongs to the portal, not the game. Left off, clicking any of them stops the game; fullscreen then keeps rendering at the pre-fullscreen resolution, so the game is blurry until the player clicks into it |
178
179
  | Compression Format | **Disabled** | ⚠️ Required, and the build is refused otherwise. SquidHub stores assets uncompressed and Cloudflare compresses them at the edge, per client. A precompressed build cannot be served correctly at all |
179
180
 
180
181
  ## Things that will otherwise bite
@@ -189,6 +190,14 @@ data:`. A CDN font, a remote texture or a third-party analytics snippet is
189
190
  blocked at load and shows up as a console error, not as a missing style.
190
191
  Everything must ship inside the build.
191
192
 
193
+ ⚠️ **Fullscreen needs two things, and neither is the Unity fullscreen button.**
194
+ Tick **Fullscreen button** in `SquidHub → Game Manifest…` — `display.fullscreen`
195
+ defaults to false and the portal draws no control without it — and turn on **Run
196
+ In Background**, or the game pauses the moment the player clicks that control and
197
+ stays at the old resolution while the frame grows. The portal fullscreens its own
198
+ container rather than asking your game to do it, so your build needs no fullscreen
199
+ code at all; Unity's own button is hidden for you.
200
+
192
201
  ⚠️ **Do not write your own rotate prompt or call `screen.orientation.lock()`.**
193
202
  Declare the orientations you support in `SquidHub → Game Manifest…` and the
194
203
  portal draws the prompt outside your frame. Two prompts fight, and yours is the one the
@@ -200,10 +209,14 @@ on your `AudioContext`. It works without you doing anything — but only because
200
209
  the bridge is injected ahead of the loader, which is why step 2 above is not
201
210
  merely tidy. Tick **Sound** in `SquidHub → Game Manifest…` or no button appears.
202
211
 
203
- ⚠️ **Editing `manifest.json` alone changes nothing.** It is excluded from the
204
- build hash, so a manifest-only re-upload registers no new version and your edit
205
- is discarded — the server now says so in a warning rather than staying silent.
206
- Change a real file and rebuild, or set an override in the console.
212
+ ⚠️ **Editing `manifest.json` alone registers a new version.** It used not to —
213
+ the manifest is excluded from the build hash, so the build looked identical and
214
+ the edit was discarded. A version is now identified by its bytes *and* its
215
+ declaration, so a manifest-only change ships. The bytes are still deduped: the
216
+ two versions share one copy in R2.
217
+
218
+ To change display on a build that is already live, the publisher console's
219
+ override is still the faster path — it needs no upload at all.
207
220
 
208
221
  ## ⚠️ Status
209
222
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.robotsquid.squidhub",
3
- "version": "0.5.9",
3
+ "version": "0.5.12",
4
4
  "displayName": "SquidHub",
5
5
  "description": "Cloud saves, analytics and the coin economy for Unity WebGL games published on SquidHub. Installs the C# wrapper, the .jslib half and the page bridge, and rewrites the exported index.html so it survives the platform's CSP.",
6
6
  "unity": "2021.3",