Hi there,
I’ve been trying to get some work done on a plugin, however im stuck at the very beginning: Whenever i try to create a plugin, and then create a new C++ class in it, i get this error:
What i’ve done:
-
Created empty project
-
Created Blank plugin, named MyPlugin
-
Added new C++ class, UObject parent class, inside the MyPlugin(Runtime) module.
The error i get:
Launching UnrealBuildTool... [D:/Epic Games/UnrealEngine/UE_4.23/Engine/Binaries/DotNET/UnrealBuildTool.exe -ModuleWithSuffix=MyPlugin,2890 Win64 Development -TargetType=Editor -Project="C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/PluginDevelopment.uproject" -FailIfGeneratedCodeChanges "C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plu
ginDevelopment.uproject" -IgnoreJunk]
Invalidating makefile for PluginDevelopmentEditor (source file added)
Parsing headers for PluginDevelopmentEditor
Running UnrealHeaderTool "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\PluginDevelopment.uproject" "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\Intermediate\Build\Win64\PluginDevelopmentEditor\Development\PluginDevelopmentEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors
-installed -FailIfGeneratedCodeChanges
ERROR: 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/MyObject.generated.h': Changes to generated code are not allowed - conflicts written to 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/MyObject.generated.h.
conflict'
CompilerResultsLog: New page: Compilation - 05.10.2019 04:42:19
CompilerResultsLog: Invalidating makefile for PluginDevelopmentEditor (source file added)
CompilerResultsLog: Parsing headers for PluginDevelopmentEditor
CompilerResultsLog: Running UnrealHeaderTool "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\PluginDevelopment.uproject" "C:\Users\fabia\workspace\ue_workspace\PluginDevelopment\Intermediate\Build\Win64\PluginDevelopmentEditor\Development\PluginDevelopmentEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattende
d -WarningsAsErrors -installed -FailIfGeneratedCodeChanges
CompilerResultsLog: ERROR: 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/MyObject.generated.h': Changes to generated code are not allowed - conflicts written to 'C:/Users/fabia/workspace/ue_workspace/PluginDevelopment/Plugins/MyPlugin/Intermediate/Build/Win64/UE4Editor/Inc/MyPlugin/M
yObject.generated.h.conflict'
I’ll attach the MyObject.generated.h below.
What i tried so far (which didnt work):
-
Tried manually adding classes and generating project solution after
-
Tried rebuilding project from solutoin after creating the plugin
-
Tried building as Development Editor from vs
Your help will be much appreciated, thank you in advance. <3
[It wont let me upload the file, so here’s its rather lengthy content:]
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
===========================================================================*/
#include "UObject/ObjectMacros.h"
#include "UObject/ScriptMacros.h"
PRAGMA_DISABLE_DEPRECATION_WARNINGS
#ifdef MYPLUGIN_MyObject_generated_h
#error "MyObject.generated.h already included, missing '#pragma once' in MyObject.h"
#endif
#define MYPLUGIN_MyObject_generated_h
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_RPC_WRAPPERS
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_RPC_WRAPPERS_NO_PURE_DECLS
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_INCLASS_NO_PURE_DECLS \
private: \
static void StaticRegisterNativesUMyObject(); \
friend struct Z_Construct_UClass_UMyObject_Statics; \
public: \
DECLARE_CLASS(UMyObject, UObject, COMPILED_IN_FLAGS(0), CASTCLASS_None, TEXT("/Script/MyPlugin"), NO_API) \
DECLARE_SERIALIZER(UMyObject)
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_INCLASS \
private: \
static void StaticRegisterNativesUMyObject(); \
friend struct Z_Construct_UClass_UMyObject_Statics; \
public: \
DECLARE_CLASS(UMyObject, UObject, COMPILED_IN_FLAGS(0), CASTCLASS_None, TEXT("/Script/MyPlugin"), NO_API) \
DECLARE_SERIALIZER(UMyObject)
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_STANDARD_CONSTRUCTORS \
/** Standard constructor, called after all reflected properties have been initialized */ \
NO_API UMyObject(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); \
DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UMyObject) \
DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, UMyObject); \
DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UMyObject); \
private: \
/** Private move- and copy-constructors, should never be used */ \
NO_API UMyObject(UMyObject&&); \
NO_API UMyObject(const UMyObject&); \
public:
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_ENHANCED_CONSTRUCTORS \
/** Standard constructor, called after all reflected properties have been initialized */ \
NO_API UMyObject(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()) : Super(ObjectInitializer) { }; \
private: \
/** Private move- and copy-constructors, should never be used */ \
NO_API UMyObject(UMyObject&&); \
NO_API UMyObject(const UMyObject&); \
public: \
DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, UMyObject); \
DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(UMyObject); \
DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(UMyObject)
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_PRIVATE_PROPERTY_OFFSET
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_12_PROLOG
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_GENERATED_BODY_LEGACY \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_PRIVATE_PROPERTY_OFFSET \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_RPC_WRAPPERS \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_INCLASS \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_STANDARD_CONSTRUCTORS \
public: \
PRAGMA_ENABLE_DEPRECATION_WARNINGS
#define PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_GENERATED_BODY \
PRAGMA_DISABLE_DEPRECATION_WARNINGS \
public: \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_PRIVATE_PROPERTY_OFFSET \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_RPC_WRAPPERS_NO_PURE_DECLS \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_INCLASS_NO_PURE_DECLS \
PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h_15_ENHANCED_CONSTRUCTORS \
private: \
PRAGMA_ENABLE_DEPRECATION_WARNINGS
template<> MYPLUGIN_API UClass* StaticClass<class UMyObject>();
#undef CURRENT_FILE_ID
#define CURRENT_FILE_ID PluginDevelopment_Plugins_MyPlugin_Source_MyPlugin_Public_MyObject_h
PRAGMA_ENABLE_DEPRECATION_WARNINGS