fix(ue58): use versioned material sampler API - #127
Open
kunkunGames wants to merge 1 commit into
Open
Conversation
kunkunGames
marked this pull request as ready for review
August 4, 2026 16:30
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.
Summary
Add one reusable UE 5.7/5.8 compatibility boundary for material sampler inference and route both Monolith consumers through it.
Problem
UE 5.8 moved
GetSamplerTypeForTexturefromUMaterialExpressionTextureBasetoMaterialExpressionUtilsand deprecated the former entry point. UE 5.7 does not exposeMaterialExpressionUtils.h, so an unconditional migration would break Monolith's supported compile floor.The deprecated call existed independently in
MonolithIndexandMonolithMaterial, which duplicated the compatibility problem and produced both sampler warnings tracked in #121.Solution
Introduce
MonolithMaterialSamplerCompat::GetSamplerTypeForTextureas a small header-only adapter:UMaterialExpressionTextureBase::GetSamplerTypeForTextureMaterialExpressionUtils::GetSamplerTypeForTextureCentralizing the version gate avoids repeated preprocessor branches and gives future sampler consumers one stable extension point. Returned metadata and runtime behavior remain unchanged.
Verification
RunUAT BuildPlugin -NoTargetPlatforms -Rocket: 434/434 Editor actions passed; UAT exit code 0RunUAT BuildPlugin -NoTargetPlatforms -Rocket: 434/434 Editor actions passed; UAT exit code 0GenericAssetIndexer.cppandMonolithMaterialActions.cppas individual actionsGetSamplerTypeForTextureC4996 warningsgit diff --checkpassedDocs/testing/2026-08-04-ue58-material-sampler-api.mdCompatibility and risk
This PR addresses only the two material-sampler deprecations in #121; unrelated UE 5.8 warnings remain out of scope. The adapter preserves UE 5.7 support and does not change public MCP actions, serialized data, or configuration.
Visual evidence
Not applicable: this is a compile-time engine API compatibility change with no visual or editor-facing UI behavior.