[unity] Added a warning when a .skel file is found instead of .skel.bytes during import.

This commit is contained in:
Harald Csaszar 2022-09-02 20:58:42 +02:00
parent a3e0ab37ed
commit 7a95875ebb
2 changed files with 6 additions and 1 deletions

View File

@ -338,6 +338,11 @@ namespace Spine.Unity.Editor {
Debug.LogWarningFormat("`{0}` : If this file is a Spine atlas, please change its extension to `.atlas.txt`. This is to allow Unity to recognize it and avoid filename collisions. You can also set this file extension when exporting from the Spine editor.", str);
}
break;
case ".skel":
if (SpineEditorUtilities.Preferences.atlasTxtImportWarning) {
Debug.LogWarningFormat("`{0}` : If this file is a Spine skeleton, please change its extension to `.skel.bytes`. This is to allow Unity to recognize it and avoid filename collisions. You can also set this file extension when exporting from the Spine editor.", str);
}
break;
case ".txt":
if (str.EndsWith(".atlas.txt", System.StringComparison.Ordinal))
atlasPaths.Add(str);

View File

@ -288,7 +288,7 @@ namespace Spine.Unity.Editor {
EditorGUILayout.Space();
EditorGUILayout.LabelField("Warnings", EditorStyles.boldLabel);
{
EditorGUILayout.PropertyField(settings.FindProperty("atlasTxtImportWarning"), new GUIContent("Atlas Extension Warning", "Log a warning and recommendation whenever a `.atlas` file is found."));
EditorGUILayout.PropertyField(settings.FindProperty("atlasTxtImportWarning"), new GUIContent("Atlas & Skel Extension Warning", "Log a warning and recommendation whenever a `.atlas` or `.skel` file is found."));
EditorGUILayout.PropertyField(settings.FindProperty("textureImporterWarning"), new GUIContent("Texture Settings Warning", "Log a warning and recommendation whenever Texture Import Settings are detected that could lead to undesired effects, e.g. white border artifacts."));
EditorGUILayout.PropertyField(settings.FindProperty("componentMaterialWarning"), new GUIContent("Component & Material Warning", "Log a warning and recommendation whenever Component and Material settings are not compatible."));
}