launch-unity 0.4.0 → 0.5.0

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.
Files changed (2) hide show
  1. package/dist/launch.js +13 -0
  2. package/package.json +1 -1
package/dist/launch.js CHANGED
@@ -196,6 +196,13 @@ function extractProjectPath(command) {
196
196
  }
197
197
  return trimmed;
198
198
  }
199
+ const isUnityAuxiliaryProcess = (command) => {
200
+ const normalizedCommand = command.toLowerCase();
201
+ if (normalizedCommand.includes("-batchmode")) {
202
+ return true;
203
+ }
204
+ return normalizedCommand.includes("assetimportworker");
205
+ };
199
206
  async function listUnityProcessesMac() {
200
207
  let stdout = "";
201
208
  try {
@@ -225,6 +232,9 @@ async function listUnityProcessesMac() {
225
232
  if (!UNITY_EXECUTABLE_PATTERN_MAC.test(command)) {
226
233
  continue;
227
234
  }
235
+ if (isUnityAuxiliaryProcess(command)) {
236
+ continue;
237
+ }
228
238
  const projectArgument = extractProjectPath(command);
229
239
  if (!projectArgument) {
230
240
  continue;
@@ -274,6 +284,9 @@ async function listUnityProcessesWindows() {
274
284
  if (!UNITY_EXECUTABLE_PATTERN_WINDOWS.test(command)) {
275
285
  continue;
276
286
  }
287
+ if (isUnityAuxiliaryProcess(command)) {
288
+ continue;
289
+ }
277
290
  const projectArgument = extractProjectPath(command);
278
291
  if (!projectArgument) {
279
292
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launch-unity",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Open a Unity project with the matching Editor version (macOS/Windows)",
5
5
  "type": "module",
6
6
  "main": "dist/launch.js",