Skip to content
Permalink
Browse files

[Assets] Adjust PackageProfile.ResourceFolders during package upgrade

  • Loading branch information
xen2 committed Sep 12, 2018
1 parent f11fb59 commit 42306db7b35351fea49a851a60c4aaabe155dca8
Showing with 7 additions and 0 deletions.
  1. +7 −0 sources/assets/Xenko.Core.Assets/Package.cs
@@ -1417,6 +1417,13 @@ protected override void UpgradeAsset(AssetMigrationContext context, PackageVersi
profile.AssetFolders[i].Path = (string)assetPath;
}

for (int i = 0; i < profile.ResourceFolders.Count; ++i)
{
var resourcePath = UPath.Combine(assetFile.OriginalFilePath.GetFullDirectory(), (UDirectory)(string)profile.ResourceFolders[i].Path);
resourcePath = resourcePath.MakeRelative(assetFile.FilePath.GetFullDirectory());
profile.ResourceFolders[i].Path = (string)resourcePath;
}

asset.Profile = profile;
}
}

0 comments on commit 42306db

Please sign in to comment.
You can’t perform that action at this time.