mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Merge branch '4.1' into 4.2-beta
This commit is contained in:
commit
49946783de
@ -497,7 +497,7 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
static void AddDependentAtlasIfImageChanged (List<string> atlasPaths, List<string> imagePaths) {
|
static void AddDependentAtlasIfImageChanged (List<string> atlasPaths, List<string> imagePaths) {
|
||||||
foreach (string imagePath in imagePaths) {
|
foreach (string imagePath in imagePaths) {
|
||||||
string atlasPath = imagePath.Replace(".png", ".atlas.txt");
|
string atlasPath = Path.ChangeExtension(imagePath, ".atlas.txt");
|
||||||
if (!System.IO.File.Exists(atlasPath))
|
if (!System.IO.File.Exists(atlasPath))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
@ -173,17 +173,22 @@ namespace Spine.Unity.Editor {
|
|||||||
if (EditorApplication.isPlayingOrWillChangePlaymode) return;
|
if (EditorApplication.isPlayingOrWillChangePlaymode) return;
|
||||||
|
|
||||||
string[] folders = { "Assets", "Packages" };
|
string[] folders = { "Assets", "Packages" };
|
||||||
string[] assets = AssetDatabase.FindAssets("t:script SpineEditorUtilities", folders);
|
string[] assets;
|
||||||
string assetPath = AssetDatabase.GUIDToAssetPath(assets[0]);
|
string assetPath;
|
||||||
editorPath = Path.GetDirectoryName(assetPath).Replace('\\', '/');
|
|
||||||
|
|
||||||
assets = AssetDatabase.FindAssets("t:texture icon-subMeshRenderer", folders);
|
assets = AssetDatabase.FindAssets("t:texture icon-subMeshRenderer", folders);
|
||||||
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('\\', '/');
|
||||||
} else {
|
|
||||||
editorGUIPath = editorPath.Replace("/Utility", "/GUI");
|
|
||||||
}
|
}
|
||||||
|
assets = AssetDatabase.FindAssets("t:script SpineEditorUtilities", folders);
|
||||||
|
if (assets.Length > 0) {
|
||||||
|
assetPath = AssetDatabase.GUIDToAssetPath(assets[0]);
|
||||||
|
editorPath = Path.GetDirectoryName(assetPath).Replace('\\', '/');
|
||||||
|
if (string.IsNullOrEmpty(editorGUIPath))
|
||||||
|
editorGUIPath = editorPath.Replace("/Utility", "/GUI");
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(editorGUIPath))
|
||||||
|
return;
|
||||||
Icons.Initialize();
|
Icons.Initialize();
|
||||||
|
|
||||||
// Drag and Drop
|
// Drag and Drop
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user