Thanks for that, Blinz. It hasn't actually worked, but I think I can see why (and I wouldn't be surprised if this is why it wasn't working for me at all to start with). I followed your steps and it didn't appear to work, but I noticed I'm getting the following error in the Console:
"NullReferenceException: Object reference not set to an instance of an object
SpineEditorUtilities.ResetExistingSkeletonData (System.String skeletonJSONPath) (at Assets/spine-unity/Editor/SpineEditorUtilities.cs:382)"
ResetExistingSkeletonData! That sounds very much like the kind of function I need. I've just looked in the SpineEditorUtilities.cs file and can see the following code:
static void ResetExistingSkeletonData (string skeletonJSONPath) {
string dir = Path.GetDirectoryName(skeletonJSONPath);
TextAsset textAsset = (TextAsset)AssetDatabase.LoadAssetAtPath(skeletonJSONPath, typeof(TextAsset));
DirectoryInfo dirInfo = new DirectoryInfo(dir);
FileInfo[] files = dirInfo.GetFiles("*.asset");
foreach (var f in files) {
string localPath = dir + "/" + f.Name;
var obj = AssetDatabase.LoadAssetAtPath(localPath, typeof(Object));
if (obj is SkeletonDataAsset) {
var skeletonDataAsset = (SkeletonDataAsset)obj;
if (skeletonDataAsset.skeletonJSON == textAsset) {
if (Selection.activeObject == skeletonDataAsset)
Selection.activeObject = null;
skeletonDataAsset.Reset();
string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(skeletonDataAsset));
string lastHash = EditorPrefs.GetString(guid + "_hash");
if (lastHash != skeletonDataAsset.GetSkeletonData(true).Hash) {
//do any upkeep on synchronized assets
UpdateMecanimClips(skeletonDataAsset);
}
EditorPrefs.SetString(guid + "_hash", skeletonDataAsset.GetSkeletonData(true).Hash);
}
}
}
}
That all looks fine to me, but I'm no expert, and obviously something has gone wrong. The ".asset" file is in the correct place, so I'm not sure what could be causing this.
Do you think I should start a new thread specifically for this error?