[unity] Excluding modal dialogs when running editor in batch mode.

This commit is contained in:
Harald Csaszar 2025-10-09 13:47:58 +02:00
parent 56734cde15
commit 4fc7a003c3
3 changed files with 15 additions and 2 deletions

View File

@ -55,6 +55,10 @@
#define HAS_PACKAGE_INFO
#endif
#if UNITY_2018_2_OR_NEWER
#define HAS_BATCHMODE_QUERY
#endif
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -817,6 +821,9 @@ namespace Spine.Unity.Editor {
/// <returns>True if automatic fixing by switching to suitable settings was selected.</returns>
static bool ShowWorkflowMismatchDialog (SpineAtlasAsset atlasAsset, bool isLinearPMAMismatch, bool atlasIsPMA) {
#if HAS_BATCHMODE_QUERY
if (Application.isBatchMode) return false;
#endif
string atlasFileName = atlasAsset.atlasFile.name;
Selection.activeObject = atlasAsset.atlasFile;
EditorGUIUtility.PingObject(atlasAsset.atlasFile);

View File

@ -31,6 +31,10 @@
#define HAS_MODAL_UTILITY
#endif
#if UNITY_2018_2_OR_NEWER
#define HAS_BATCHMODE_QUERY
#endif
using UnityEditor;
using UnityEngine;
@ -52,7 +56,9 @@ namespace Spine.Unity.Editor {
private static ComponentUpgradeWarningDialog currentWindow;
public static DialogResult ShowDialog () {
#if HAS_BATCHMODE_QUERY
if (Application.isBatchMode) return DialogResult.None;
#endif
if (currentWindow != null) {
currentWindow.Close();
}

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity",
"displayName": "spine-unity Runtime",
"description": "This plugin provides the spine-unity runtime core and examples. Spine Examples can be installed via the Samples tab.",
"version": "4.3.20",
"version": "4.3.21",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",