com.valectric.mooserunner 2.1.14 → 2.1.16

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.
@@ -8,7 +8,7 @@
8
8
  "overrideReferences": true,
9
9
  "precompiledReferences": [
10
10
  "MooseRunner.Worker.dll",
11
- "MooseRunner.SessionRecorder.dll"
11
+ "MooseRunner.SessionRecorder.Public.dll"
12
12
  ],
13
13
  "autoReferenced": false,
14
14
  "defineConstraints": [],
@@ -17,6 +17,11 @@
17
17
  "name": "com.singularitygroup.hotreload",
18
18
  "expression": "",
19
19
  "define": "HOT_RELOAD_PRESENT"
20
+ },
21
+ {
22
+ "name": "com.unity.recorder",
23
+ "expression": "",
24
+ "define": "UNITY_RECORDER_PRESENT"
20
25
  }
21
26
  ],
22
27
  "noEngineReferences": false
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 32836dad46841cc2933266e8991f384e
2
+ guid: 70a3dbbdc7c92a81a1540262a7f14bfd
3
3
  PluginImporter:
4
4
  externalObjects: {}
5
5
  serializedVersion: 2
Binary file
@@ -0,0 +1,34 @@
1
+ fileFormatVersion: 2
2
+ guid: 32836dad46841cc2933266e8991f384e
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints:
9
+ - UNITY_RECORDER_PRESENT
10
+ isPreloaded: 0
11
+ isOverridable: 1
12
+ isExplicitlyReferenced: 0
13
+ validateReferences: 0
14
+ platformData:
15
+ - first:
16
+ Any:
17
+ second:
18
+ enabled: 0
19
+ settings: {}
20
+ - first:
21
+ Editor: Editor
22
+ second:
23
+ enabled: 1
24
+ settings:
25
+ DefaultValueInitialized: true
26
+ - first:
27
+ Windows Store Apps: WindowsStoreApps
28
+ second:
29
+ enabled: 0
30
+ settings:
31
+ CPU: AnyCPU
32
+ userData:
33
+ assetBundleName:
34
+ assetBundleVariant:
Binary file
@@ -6,9 +6,12 @@
6
6
  "MooseRunner.Demo.Support",
7
7
  "UniTask",
8
8
  "MooseRunner.helper",
9
+ "MooseRunner.Editor",
9
10
  "MooseRunner.Runtime"
10
11
  ],
11
- "includePlatforms": [],
12
+ "includePlatforms": [
13
+ "Editor"
14
+ ],
12
15
  "excludePlatforms": [],
13
16
  "allowUnsafeCode": false,
14
17
  "precompiledReferences": [
@@ -5,6 +5,9 @@ using System.Collections;
5
5
  using Object = UnityEngine.Object;
6
6
  using MooseRunner.Multiplaytest;
7
7
  using MooseRunner.helper;
8
+ using MooseRunner.SessionRecorder;
9
+ using System.IO;
10
+ using System.Threading;
8
11
  using System.Threading.Tasks;
9
12
 
10
13
  namespace MooseRunner.Internal.Tests
@@ -204,10 +207,28 @@ namespace MooseRunner.Internal.Tests
204
207
 
205
208
  /// <summary>
206
209
  /// Tests the "Dying" mechanic, ensuring the entity is destroyed or marked dead when health reaches zero.
210
+ /// Also demonstrates SessionRecorder usage: records the test, then asks Gemini to describe what happened.
211
+ /// When Unity Recorder isn't installed every facade call throws InvalidOperationException with install
212
+ /// instructions; the catches log the message so all three throw sites surface in the test output.
207
213
  /// </summary>
208
214
  [Test]
209
215
  public async Task TestDying()
210
216
  {
217
+ // SessionRecorder soft-dep: start a recording. Throws with install instructions if
218
+ // com.unity.recorder isn't installed.
219
+ SessionInfo recordingSession = null;
220
+ string outputPath = Path.Combine(Application.dataPath, "../.mooserunner/Recordings/TestDying");
221
+ try
222
+ {
223
+ var cfg = new SessionRecordingConfig(Camera.main, outputPath);
224
+ recordingSession = await SessionRecorderFacade.Instance.StartRecordingAsync(cfg, CancellationToken.None);
225
+ Debug.Log("[SessionRecorder] Started recording: " + recordingSession.SessionPath);
226
+ }
227
+ catch (InvalidOperationException ex)
228
+ {
229
+ Debug.LogWarning("[SessionRecorder] StartRecordingAsync threw: " + ex.Message);
230
+ }
231
+
211
232
  // Load the "Ghost_Cat" prefab from the Resources folder
212
233
  GameObject ghostCatPrefab = Resources.Load<GameObject>("Ghost_Cat");
213
234
  Assert.IsNotNull(ghostCatPrefab, "The Ghost_Cat prefab could not be found in the Resources folder.");
@@ -262,6 +283,35 @@ namespace MooseRunner.Internal.Tests
262
283
  // Stop the character after simulation ends
263
284
  enemyComponent.moveForward = false;
264
285
 
286
+ // SessionRecorder soft-dep: stop recording. Throws the same install-instruction
287
+ // message when Recorder isn't installed.
288
+ try
289
+ {
290
+ SessionRecorderFacade.Instance.StopRecording();
291
+ Debug.Log("[SessionRecorder] Stopped recording");
292
+ }
293
+ catch (InvalidOperationException ex)
294
+ {
295
+ Debug.LogWarning("[SessionRecorder] StopRecording threw: " + ex.Message);
296
+ }
297
+
298
+ // SessionRecorder soft-dep: video analysis via Gemini. Throws the install-instruction
299
+ // message when Recorder isn't installed (different from a Gemini-not-configured error
300
+ // — that one only surfaces once we get past the Recorder gate).
301
+ try
302
+ {
303
+ string sessionPath = recordingSession?.SessionPath ?? outputPath;
304
+ var result = await SessionRecorderFacade.Instance.AnalyzeVideoSegmentAsync(
305
+ sessionPath, 0.0, 5.0,
306
+ "Did the Ghost_Cat catch fire and die?",
307
+ CancellationToken.None);
308
+ Debug.Log("[SessionRecorder] Gemini analysis: " + result.Summary);
309
+ }
310
+ catch (InvalidOperationException ex)
311
+ {
312
+ Debug.LogWarning("[SessionRecorder] AnalyzeVideoSegmentAsync threw: " + ex.Message);
313
+ }
314
+
265
315
  // Check if the entity is destroyed or marked as "dead"
266
316
  Assert.IsTrue(ghostCatInstance == null || !ghostCatInstance.activeSelf,
267
317
  "The Ghost_Cat was not destroyed or deactivated.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.valectric.mooserunner",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "displayName": "MooseRunner",
5
5
  "description": "MooseRunner boosts PlayMode testing with Hot Reload, MCP for AIs, timescale control, and Task support. It enables rapid iteration, auto test reruns, full documentation and dedicated support.",
6
6
  "unity": "6000.2",