Repository navigation
Make Asset.Replaces a proper reference + editor UX - #3295
Merged
Merged
Conversation
Carry id + location like Archetype: resolved id-first with location fallback, so it survives the target being renamed or moved, and as a reference it skips path relativization. It is kept out of the dependency graph so the target is not collected as a build dependency.
Add ContentLinkType.Replace and register Replaces under it. It is excluded from the default Reference queries so it is never a build dependency, but the editor can now see who replaces an asset.
Drop the force-root of assets that declare Replaces: the content is swapped into the target's slot before enumeration, so the target's own reachability decides whether it ships.
Mirror the forward "Replaces:" node on the target: when another asset replaces this one, add a read-only link to it.
The replacing asset ships its content through the asset it replaces, so its dot now mirrors that target's inclusion. It is never a root on its own.
Mirror the "Replaces" overlay icon and tooltip on the target asset, kept live through CheckAssetReplacements.
The dot means the asset's content is used in the build. A replaced asset ships its slot with the replacement's content, so it shows an orange "overridden" dot when reachable (grey when unreachable). The replacing asset keeps its green dot since its content is what ships.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns
Asset.Replacesfrom a URL into anAssetReference(id + location, likeArchetype), and surfaces replacements in the editor.Core
Asset.Replacesis now anAssetReference, resolved by id so it survives the target being renamed or moved. As a reference it skips path relativization, which also fixes the save-time crash.Replacedependency link: visible to the editor, but excluded from the defaultReferencequeries so it is never a build dependency.Editor
Related Issue
Types of changes
Checklist