mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Excluding modal dialogs when running editor in batch mode.
This commit is contained in:
parent
56734cde15
commit
4fc7a003c3
@ -55,6 +55,10 @@
|
|||||||
#define HAS_PACKAGE_INFO
|
#define HAS_PACKAGE_INFO
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_2018_2_OR_NEWER
|
||||||
|
#define HAS_BATCHMODE_QUERY
|
||||||
|
#endif
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -817,6 +821,9 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
/// <returns>True if automatic fixing by switching to suitable settings was selected.</returns>
|
/// <returns>True if automatic fixing by switching to suitable settings was selected.</returns>
|
||||||
static bool ShowWorkflowMismatchDialog (SpineAtlasAsset atlasAsset, bool isLinearPMAMismatch, bool atlasIsPMA) {
|
static bool ShowWorkflowMismatchDialog (SpineAtlasAsset atlasAsset, bool isLinearPMAMismatch, bool atlasIsPMA) {
|
||||||
|
#if HAS_BATCHMODE_QUERY
|
||||||
|
if (Application.isBatchMode) return false;
|
||||||
|
#endif
|
||||||
string atlasFileName = atlasAsset.atlasFile.name;
|
string atlasFileName = atlasAsset.atlasFile.name;
|
||||||
Selection.activeObject = atlasAsset.atlasFile;
|
Selection.activeObject = atlasAsset.atlasFile;
|
||||||
EditorGUIUtility.PingObject(atlasAsset.atlasFile);
|
EditorGUIUtility.PingObject(atlasAsset.atlasFile);
|
||||||
|
|||||||
@ -31,6 +31,10 @@
|
|||||||
#define HAS_MODAL_UTILITY
|
#define HAS_MODAL_UTILITY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_2018_2_OR_NEWER
|
||||||
|
#define HAS_BATCHMODE_QUERY
|
||||||
|
#endif
|
||||||
|
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -52,7 +56,9 @@ namespace Spine.Unity.Editor {
|
|||||||
private static ComponentUpgradeWarningDialog currentWindow;
|
private static ComponentUpgradeWarningDialog currentWindow;
|
||||||
|
|
||||||
public static DialogResult ShowDialog () {
|
public static DialogResult ShowDialog () {
|
||||||
|
#if HAS_BATCHMODE_QUERY
|
||||||
|
if (Application.isBatchMode) return DialogResult.None;
|
||||||
|
#endif
|
||||||
if (currentWindow != null) {
|
if (currentWindow != null) {
|
||||||
currentWindow.Close();
|
currentWindow.Close();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.spine-unity",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core and examples. Spine Examples can be installed via the Samples tab.",
|
"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",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user