mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed Parallel Import not applying preset atlas texture settings. Closes #2496.
This commit is contained in:
parent
3b4e6eff65
commit
11c0bf8bbe
@ -75,6 +75,10 @@ namespace Spine.Unity.Editor {
|
|||||||
public static bool initialized;
|
public static bool initialized;
|
||||||
private static List<string> texturesWithoutMetaFile = new List<string>();
|
private static List<string> texturesWithoutMetaFile = new List<string>();
|
||||||
|
|
||||||
|
public static void OnTextureImportedFirstTime (string texturePath) {
|
||||||
|
texturesWithoutMetaFile.Add(texturePath);
|
||||||
|
}
|
||||||
|
|
||||||
// Auto-import entry point for textures
|
// Auto-import entry point for textures
|
||||||
void OnPreprocessTexture () {
|
void OnPreprocessTexture () {
|
||||||
#if UNITY_2018_1_OR_NEWER
|
#if UNITY_2018_1_OR_NEWER
|
||||||
@ -546,6 +550,16 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SpineAssetModificationProcessor : UnityEditor.AssetModificationProcessor {
|
||||||
|
static void OnWillCreateAsset (string assetName) {
|
||||||
|
// Note: This method seems to be called from the main thread,
|
||||||
|
// not from worker threads when Project Settings - Editor - Parallel Import is enabled.
|
||||||
|
int endIndex = assetName.LastIndexOf(".meta");
|
||||||
|
string assetPath = endIndex < 0 ? assetName : assetName.Substring(0, endIndex);
|
||||||
|
SpineEditorUtilities.OnTextureImportedFirstTime(assetPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class TextureModificationWarningProcessor : UnityEditor.AssetModificationProcessor {
|
public class TextureModificationWarningProcessor : UnityEditor.AssetModificationProcessor {
|
||||||
static string[] OnWillSaveAssets (string[] paths) {
|
static string[] OnWillSaveAssets (string[] paths) {
|
||||||
if (SpineEditorUtilities.Preferences.textureImporterWarning) {
|
if (SpineEditorUtilities.Preferences.textureImporterWarning) {
|
||||||
|
|||||||
@ -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.",
|
"description": "This plugin provides the spine-unity runtime core.",
|
||||||
"version": "4.2.59",
|
"version": "4.2.60",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user