com.robotsquid.squidhub 0.5.8 → 0.5.9

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,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.9
4
+
5
+ **Build and Upload just uploads.** The "Upload N files (X MB)?" confirmation is
6
+ gone. Choosing the action IS the decision, and a modal that appears after a long
7
+ WebGL build is worse than redundant — it stops an unattended build from ever
8
+ finishing.
9
+
10
+ Nothing it said is lost, only moved. The file count, the size, the endpoint, the
11
+ skipped OS metadata, the missing-manifest warning and the build warnings all go
12
+ to the Console, where they can be read *during* the upload and are still there
13
+ afterwards. A dialog is gone the moment it is dismissed, which is exactly when a
14
+ warning stops being read.
15
+
16
+ ⚠️ **Refusals still stop the run.** A precompressed build or one with no
17
+ `index.html` at its top level is a failure, not a confirmation, and the server
18
+ would reject it anyway.
19
+
3
20
  ## 0.5.8
4
21
 
5
22
  **The game fills the frame, and Unity's chrome is gone.**
@@ -85,32 +85,49 @@ namespace SquidHub.Editor
85
85
 
86
86
  var publish = SquidHubUploadSettings.PublishAfterUpload;
87
87
 
88
- if (!EditorUtility.DisplayDialog("SquidHub",
89
- $"Upload {scan.Files.Count} files ({scan.TotalBytes / 1024f / 1024f:F1} MB)?" +
90
- (scan.Skipped.Count > 0
91
- ? $"\n\n{scan.Skipped.Count} OS metadata file(s) will be skipped."
92
- : "") +
93
- // ⚠️ Said before the upload, not after. A build folder with no
94
- // manifest.json declares nothing — save schema 1, no display
95
- // constraints — and the publisher cannot tell from the result.
96
- (scan.Files.Any(f => f.Path == "manifest.json")
97
- ? ""
98
- : "\n\nThere is no manifest.json in this folder, so the build declares " +
99
- "nothing: save schema 1 and no display constraints. Set one up in " +
100
- "SquidHub → Game Manifest… and rebuild.") +
101
- // ⚠️ These describe a build that uploads fine and PLAYS badly,
102
- // which is the kind nobody catches until a player does.
103
- (scan.Warnings.Count > 0 ? "\n\n" + string.Join("\n\n", scan.Warnings) : "") +
104
- (publish
105
- ? "\n\nIt will be published to players if the server allows it — that is " +
106
- "dev only. On prod, promote it in the console."
107
- : ""),
108
- "Upload", "Cancel"))
88
+ // ⚠️ NO CONFIRMATION. Choosing "Build and Upload" IS the decision;
89
+ // asking again is a modal between the publisher and the thing they
90
+ // just asked for, and one that appears after a long WebGL build is
91
+ // worse than useless — it stops an unattended build from finishing.
92
+ //
93
+ // ⚠️ Nothing is lost, only moved. Everything the dialog used to say
94
+ // goes to the Console, where it can be read during the upload and is
95
+ // still there afterwards — a dialog is gone the moment it is
96
+ // dismissed, which is exactly when a warning stops being read.
97
+ // Refusals above still stop the run; those are failures, not
98
+ // confirmations.
99
+ Report(scan, publish);
100
+
101
+ Run(Upload(scan, publish));
102
+ }
103
+
104
+ /// <summary>
105
+ /// What the dialog used to ask, said to the Console instead.
106
+ ///
107
+ /// ⚠️ Warnings are LogWarning, not Log. They describe a build that
108
+ /// uploads perfectly and plays badly, so they have to survive a Console
109
+ /// that is already full of build spam.
110
+ /// </summary>
111
+ private static void Report(BuildScan scan, bool publish)
112
+ {
113
+ Debug.Log($"[SquidHub] uploading {scan.Files.Count} file(s), " +
114
+ $"{scan.TotalBytes / 1024f / 1024f:F1} MB, to {SquidHubUploadSettings.Endpoint}" +
115
+ (scan.Skipped.Count > 0
116
+ ? $" ({scan.Skipped.Count} OS metadata file(s) skipped)"
117
+ : "") +
118
+ (publish ? " — will publish on success where the server allows it (dev only)." : "."));
119
+
120
+ // ⚠️ A build folder with no manifest.json declares nothing — save
121
+ // schema 1, no display constraints — and nothing in the upload
122
+ // result would ever tell the publisher that.
123
+ if (!scan.Files.Any(f => f.Path == "manifest.json"))
109
124
  {
110
- return;
125
+ Debug.LogWarning(
126
+ "[SquidHub] no manifest.json in this build, so it declares nothing: save schema 1 " +
127
+ "and no display constraints. Set one up in SquidHub → Game Manifest… and rebuild.");
111
128
  }
112
129
 
113
- Run(Upload(scan, publish));
130
+ foreach (var warning in scan.Warnings) Debug.LogWarning("[SquidHub] " + warning);
114
131
  }
115
132
 
116
133
  // ⚠️ Driven by EditorApplication.update rather than blocking. Sleeping
package/README.md CHANGED
@@ -144,6 +144,11 @@ an upload key is not a person — it sits in CI configs and Editor preferences.
144
144
  That asymmetry is deliberate: it is what keeps a leaked key from replacing the
145
145
  live build for everyone.
146
146
 
147
+ ⚠️ **It does not ask.** Choosing the action is the decision, so there is no
148
+ "upload N files?" confirmation to dismiss — the file count, size, destination and
149
+ any warnings go to the Console instead, where they survive being read. A build
150
+ that *cannot* upload still stops with a dialog naming the fix.
151
+
147
152
  The upload is refused before a byte moves if the build is precompressed or has
148
153
  no `index.html` at its top level, and OS metadata is dropped rather than sent —
149
154
  which is also what makes a build pushed from Unity hash identically to the same
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.robotsquid.squidhub",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
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",