I posted this problem on the forums, but I realize it’s probably more appropriate to have it here.
I’m attempting to extend the default CharacterMovementComponent. I used the tutorial written by Rama here.
My code is as follows (using the default TopDown level as a base - and 4.7.3):
MyProjectCharacterMovementComponent.h
UCLASS()
class UMyProjectCharacterMovementComponent : public UCharacterMovementComponent
{
GENERATED_BODY()
};
MyProjectCharacterMovementComponent.cpp
//Nothing yet
MyProjectCharacter.cpp (The only change is adding the SetDefaultSubobjectClass line to the original code)
AMyProjectCharacter::AMyProjectCharacter(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer.SetDefaultSubobjectClass<UMyProjectCharacterMovementComponent>(ACharacter::CharacterMovementComponentName))
{
...
And here’s the error I get.
Unknown exception - code 00000001 (first/second chance not available)
Fatal error: [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1644]
Object is not packaged: None None
KERNELBASE + 37901 bytes
UE4Editor_Core!FOutputDeviceWindowsError::Serialize() + 292 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
UE4Editor_Core!FMsg::Logf__VA() + 463 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:526]
UE4Editor_CoreUObject!StaticAllocateObjectErrorTests() + 941 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1644]
UE4Editor_CoreUObject!StaticAllocateObject() + 197 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:1693]
UE4Editor_CoreUObject!UClass::CreateDefaultObject() + 319 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\class.cpp:2502]
UE4Editor_CoreUObject!FObjectInitializer::CreateDefaultSubobject() + 569 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2649]
UE4Editor_CoreUObject!UObject::CreateDefaultSubobject() + 419 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\obj.cpp:62]
UE4Editor_Engine!ACharacter::ACharacter() + 888 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\character.cpp:77]
UE4Editor_MyProject_3972_Win64_DebugGame!AMyProjectCharacter::AMyProjectCharacter() + 117 bytes [e:\unreal projects\game1\myproject\source\myproject\myprojectcharacter.cpp:10]
UE4Editor_MyProject_3972_Win64_DebugGame!AMyProjectCharacter::__DefaultConstructor() + 76 bytes [e:\unreal projects\game1\myproject\source\myproject\myprojectcharacter.h:9]
UE4Editor_MyProject_3972_Win64_DebugGame!InternalConstructor<AMyProjectCharacter>() + 40 bytes [e:\unreal engine\epic games\4.7\engine\source\runtime\coreuobject\public\uobject\class.h:2238]
UE4Editor_CoreUObject!StaticConstructObject() + 1444 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2237]
UE4Editor_CoreUObject!UClass::HotReloadPrivateStaticClass() + 397 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\class.cpp:3368]
UE4Editor_MyProject_3972_Win64_DebugGame!GetPrivateStaticClassBody<AMyProjectCharacter>() + 526 bytes [e:\unreal engine\epic games\4.7\engine\source\runtime\coreuobject\public\uobject\class.h:2279]
UE4Editor_MyProject_3972_Win64_DebugGame!AMyProjectCharacter::GetPrivateStaticClass() + 78 bytes [e:\unreal projects\game1\myproject\intermediate\build\win64\inc\myproject\myproject.generated.cpp:50]
UE4Editor_MyProject_3972_Win64_DebugGame!TClassCompiledInDefer<AMyProjectCharacter>::Register() + 42 bytes [e:\unreal engine\epic games\4.7\engine\source\runtime\coreuobject\public\uobject\uobjectbase.h:296]
UE4Editor_CoreUObject!UClassRegisterAllCompiledInClasses() + 176 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:690]
UE4Editor_CoreUObject!ProcessNewlyLoadedUObjects() + 11 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:808]
UE4Editor_CoreUObject!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() + 7 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:921]
UE4Editor_Core!TBaseMulticastDelegate<void>::Broadcast() + 149 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:1030]
UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() + 2194 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\modules\modulemanager.cpp:359]
UE4Editor_Core!FModuleManager::LoadModule() + 56 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\modules\modulemanager.cpp:238]
UE4Editor_HotReload!FHotReloadModule::DoHotReloadInternal() + 648 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\developer\hotreload\private\hotreload.cpp:654]
UE4Editor_HotReload!FHotReloadModule::DoHotReloadFromIDE() + 1660 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\developer\hotreload\private\hotreload.cpp:1059]
UE4Editor_HotReload!FHotReloadModule::Tick() + 112 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\developer\hotreload\private\hotreload.cpp:995]
UE4Editor!FTicker::Tick() + 698 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\containers\ticker.h:90]
UE4Editor!FEngineLoop::Tick() + 6356 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:2352]
UE4Editor!GuardedMain() + 1404 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]
The error occurs during hot reload. However, restarting the editor doesn’t see to load in the extended CharacterMovementComponent either. Any help would be appreciated.