mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +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
|
||||
#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);
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user