Skip to content

Fix plugin packaging failure: include CustomBlueprintRenderer.h in module interface header - #4

Open
GatheredSatyr53 wants to merge 1 commit into
NanceDevDiaries:mainfrom
GatheredSatyr53:fix/missing-blueprint-renderer-include
Open

Fix plugin packaging failure: include CustomBlueprintRenderer.h in module interface header#4
GatheredSatyr53 wants to merge 1 commit into
NanceDevDiaries:mainfrom
GatheredSatyr53:fix/missing-blueprint-renderer-include

Conversation

@GatheredSatyr53

Copy link
Copy Markdown

What changed

Added the missing #include "CustomBlueprintRenderer.h" to Source/ThumbnailToTextureTool/Public/IThumbnailToTextureTool.h.

Why

IThumbnailToTextureTool.h references UCustomBlueprintRenderer in two places:

  • GetCustomBlueprintThumbnailRenderer() (line 41)
  • GetCustomBlueprintThumbnailRendererInstance() (line 73)

but the header only included CustomSkeletalMeshThumbnailRenderer.h and CustomStaticMeshThumbnailRenderer.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 include CustomBlueprintRenderer.h - into the same compilation blob, so the declaration leaks in from a neighbouring source file.

Packaging the plugin through RunUAT BuildPlugin disables unity builds, so every .cpp is compiled on its own. CustomStaticMeshThumbnailRenderer.cpp and CustomSkeletalMeshThumbnailRenderer.cpp include only IThumbnailToTextureTool.h, and both fail:

IThumbnailToTextureTool.h(41,40): error C2143: syntax error: missing ';' before '&'
IThumbnailToTextureTool.h(41,16): error C4430: missing type specifier - int assumed
IThumbnailToTextureTool.h(42,2):  error C2334: unexpected token(s) preceding '{'
IThumbnailToTextureTool.h(73,34): error C2143: syntax error: missing ';' before '*'
IThumbnailToTextureTool.h(73,10): error C2433: 'virtual' not permitted on data declarations
IThumbnailToTextureTool.h(73,85): error C2238: unexpected token(s) preceding ';'

Notes for reviewers

  • One line, include-only; no behaviour change.
  • Include placed alphabetically to match the existing include block ordering.
  • A forward declaration of UCustomBlueprintRenderer would also compile, but the header already includes the other two renderer headers directly, so this keeps the file consistent and self-contained.
  • Reported build environment: UE plugin packaging on Windows, MSVC 14.44.35207 (VS 2022).

Co-authored with Claude Opus 5.

🤖 Generated with Claude Code

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant