Hi Herald,
How can I find SkeletonData(s) that are incompatible with current runtime? Given that our project has hundreds of SkeletonData(s) scattered all over the project.
Is there like a quick check or report tool for that?
Thank you, Marek.
I guess the function bellow is a good starting point for scanning whole project right? :-)
public static bool CheckForValidSkeletonData (string skeletonJSONPath)
[MenuItem("Foriero/Spine/Check Compatibility", false, 300)] public static void SpineCheckCompatibility() => SpineInternal.CheckAllSpineAssetsForCompatibility();
static class SpineInternal
{
public static void CheckAllSpineAssetsForCompatibility()
{
var guids = AssetDatabase.FindAssets("t:TextAsset");
foreach(var guid in guids)
{
var p = AssetDatabase.GUIDToAssetPath(guid);
var ta = AssetDatabase.LoadAssetAtPath<TextAsset>(p);
if(AssetUtility.IsSpineData(ta, out var compatibilityProblem))
{
if (compatibilityProblem != null) Debug.LogError(compatibilityProblem.DescriptionString());
}
}
}
}