[unity] Fix new folders AnimationReferenceAsset.

This commit is contained in:
pharan 2018-07-20 03:19:40 +08:00 committed by GitHub
parent ad224c4ef4
commit c4c9743d8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -229,8 +229,8 @@ namespace Spine.Unity.Editor {
void CreateAnimationReferenceAssets () {
const string AssetFolderName = "ReferenceAssets";
string parentFolder = AssetDatabase.GetAssetPath(targetSkeletonDataAsset);
string dataPath = System.IO.Path.GetDirectoryName(parentFolder) + "/" + AssetFolderName;
string parentFolder = System.IO.Path.GetDirectoryName(AssetDatabase.GetAssetPath(targetSkeletonDataAsset));
string dataPath = parentFolder + "/" + AssetFolderName;
if (!AssetDatabase.IsValidFolder(dataPath)) {
AssetDatabase.CreateFolder(parentFolder, AssetFolderName);
}