[unity] Editor icons not loaded from UPM package on Unity 2022.1. Closes #2455.

This commit is contained in:
Harald Csaszar 2024-01-24 17:10:54 +01:00
parent 2c6d10bef8
commit 42635d2a8f
2 changed files with 3 additions and 4 deletions

View File

@ -172,15 +172,14 @@ namespace Spine.Unity.Editor {
if (EditorApplication.isPlayingOrWillChangePlaymode) return; if (EditorApplication.isPlayingOrWillChangePlaymode) return;
string[] folders = { "Assets", "Packages" };
string[] assets; string[] assets;
string assetPath; string assetPath;
assets = AssetDatabase.FindAssets("t:texture icon-subMeshRenderer", folders); assets = AssetDatabase.FindAssets("t:texture icon-subMeshRenderer", null);
if (assets.Length > 0) { if (assets.Length > 0) {
assetPath = AssetDatabase.GUIDToAssetPath(assets[0]); assetPath = AssetDatabase.GUIDToAssetPath(assets[0]);
editorGUIPath = Path.GetDirectoryName(assetPath).Replace('\\', '/'); editorGUIPath = Path.GetDirectoryName(assetPath).Replace('\\', '/');
} }
assets = AssetDatabase.FindAssets("t:script SpineEditorUtilities", folders); assets = AssetDatabase.FindAssets("t:script SpineEditorUtilities", null);
if (assets.Length > 0) { if (assets.Length > 0) {
assetPath = AssetDatabase.GUIDToAssetPath(assets[0]); assetPath = AssetDatabase.GUIDToAssetPath(assets[0]);
editorPath = Path.GetDirectoryName(assetPath).Replace('\\', '/'); editorPath = Path.GetDirectoryName(assetPath).Replace('\\', '/');

View File

@ -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.1.34", "version": "4.1.35",
"unity": "2018.3", "unity": "2018.3",
"author": { "author": {
"name": "Esoteric Software", "name": "Esoteric Software",