Fix plugin packaging failure: include CustomBlueprintRenderer.h in module interface header - #4
Open
GatheredSatyr53 wants to merge 1 commit into
Conversation
…rface IThumbnailToTextureTool.h references UCustomBlueprintRenderer in GetCustomBlueprintThumbnailRenderer() and GetCustomBlueprintThumbnailRendererInstance(), but only included the static mesh and skeletal mesh renderer headers. The type was never declared in that translation unit. This went unnoticed in normal editor builds because UBT's unity build merges ThumbnailToTextureTool.cpp - which does include CustomBlueprintRenderer.h - into the same blob. When the plugin is packaged via RunUAT BuildPlugin, unity builds are disabled and each .cpp is compiled on its own, so CustomStaticMeshThumbnailRenderer.cpp and CustomSkeletalMeshThumbnailRenderer.cpp failed with C2143 / C4430 / C2334 / C2433 on those two declarations. Adding the missing include makes the header self-contained. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What changed
Added the missing
#include "CustomBlueprintRenderer.h"toSource/ThumbnailToTextureTool/Public/IThumbnailToTextureTool.h.Why
IThumbnailToTextureTool.hreferencesUCustomBlueprintRendererin two places:GetCustomBlueprintThumbnailRenderer()(line 41)GetCustomBlueprintThumbnailRendererInstance()(line 73)but the header only included
CustomSkeletalMeshThumbnailRenderer.handCustomStaticMeshThumbnailRenderer.h. The blueprint renderer type was never declared in that translation unit, and there was no forward declaration either.Why it was not caught earlier
Normal editor builds pass because UBT unity builds merge
ThumbnailToTextureTool.cpp- which does includeCustomBlueprintRenderer.h- into the same compilation blob, so the declaration leaks in from a neighbouring source file.Packaging the plugin through
RunUAT BuildPlugindisables unity builds, so every.cppis compiled on its own.CustomStaticMeshThumbnailRenderer.cppandCustomSkeletalMeshThumbnailRenderer.cppinclude onlyIThumbnailToTextureTool.h, and both fail:Notes for reviewers
UCustomBlueprintRendererwould also compile, but the header already includes the other two renderer headers directly, so this keeps the file consistent and self-contained.Co-authored with Claude Opus 5.
🤖 Generated with Claude Code