Adding an Object class to a plugin's module using the C++ Class Wizard results in a compilation error due to attempts to edit the new class' generated.h file during the initial compilation attempt.


ERROR: 'D:/Unreal Projects/Main/MyProject4/Plugins/PluginTesting/Intermediate/Build/Win64/UE4Editor/Inc/PluginTesting/MyObject.generated.h': Changes to generated code are not allowed - conflicts written to 'D:/Unreal Projects/Main/MyProject4/Plugins/PluginTesting/Intermediate/Build/Win64/UE4Editor/Inc/PluginTesting/MyObject.generated.h.conflict'

Note: any subsequent compilations will succeed without any errors related to this process.

Regression?: No
This occurs in 4.20

Steps to Reproduce
  1. Create a new C++ project
  2. Add a new plugin (a Blank plugin was used for this test, but any other than Content Only should work)
  3. Add a new C++ class that inherits from Object to the Plugin's module (select the module from the dropdown beside the entry field for the class' name.
    Result: The initial compilation to add the new class fails
    Expected: The initial compilation to add the new class succeeds

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-68317 in the post.

Login to Vote

Won't Fix
ComponentUE - Foundation - Core
Affects Versions4.
CreatedJan 10, 2019
ResolvedAug 27, 2021
UpdatedAug 27, 2021