Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,17 @@ public override bool Execute ()
// .. and remove the @OriginalItemSpec which is for @asset
scnassetsItem.RemoveMetadata ("OriginalItemSpec");

// The Link metadata is for the asset, but 'scnassetsItem' is the containing *.scnasset directory,
// so we need to update the Link metadata accordingly (if it exists).
var link = scnassetsItem.GetMetadata ("Link");
if (!string.IsNullOrEmpty (link)) {
var newLinkLength = link.Length - (asset.ItemSpec.Length - scnassets.Length);
if (newLinkLength > 0 && newLinkLength < link.Length) {
link = link.Substring (0, newLinkLength);
scnassetsItem.SetMetadata ("Link", link);
}
}

var assetMetadata = asset.GetMetadata ("DefiningProjectFullPath");
if (assetMetadata != scnassetsItem.GetMetadata ("DefiningProjectFullPath")) {
// xbuild doesn't set this, so we'll do it
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/dotnet/AppWithResources/shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<!-- ImageAssets: included by default (each platform has a Resources/Images.xcassets directory) -->
<!-- InterfaceDefinition: included by default (each platform has a separate storyboard) -->
<SceneKitAsset Include="../*.scnassets/*" />
<SceneKitAsset Include="../*/linkedArt.scnassets/*" Link="%(RecursiveDir)%(FileName)%(Extension)" />

<Collada Include="../*.dae" />
<AtlasTexture Include="../*.atlas/**/*" />
<CoreMLModel Include="../*.mlmodel" />
Expand Down