[Answered] Compiling inside editor not working

Hello :slight_smile:

When I add new class via Add Code to project, and then I don’t make any changes in code, i just hit compile in editor (Unreal) then I get compilation error

Im developing on OSX, and If i compile using XCode, then it is fine.

This is error log:

Info Info Running Mono… Info Info
/Users/Shared/UnrealEngine/4.0/Engine
/Users/Shared/UnrealEngine/4.0/Engine/Binaries/Mac
Info Compiling with Mac SDK 10.8 Info
Parsing headers for Learningproj Info
ERROR: ‘/Users/Damian/Documents/Unreal
Projects/Learningproj/Intermediate/Build/Mac/Inc/Learningproj/PickupCollectible.generated.h’:
Changes to generated code are not
allowed - conflicts written to
‘/Users/Damian/Documents/Unreal
Projects/Learningproj/Intermediate/Build/Mac/Inc/Learningproj/PickupCollectible.generated.h.conflict’
Info Error: Failed to generate code
for Learningproj Info ERROR:
UnrealHeaderTool failed for target
‘Learningproj’ (platform: Mac, module
info: /Users/Damian/Documents/Unreal
Projects/Learningproj/Intermediate/Build/Mac/Learningproj/DebugGame/UnrealHeaderTool.manifest).

You can only compile in the editor if you change some code inside a function. It doesn’t work if you add a new class or a new function. You have close the editor, compile it in Xcode/VS and then you can start debugging again.