Hi,
I have moved to UE4.15, FObjectFinder whith UPaperFlipbook gives a compile error.
to regerenate this error:
-
created new c++ sidescroller project
-
add the following lines to the character constructor, then compile
static ConstructorHelpers::FObjectFinder IdleAnimationObj(TEXT("/Game/2dSideScroller/Sprites/IdleAnimation.IdleAnimation"));
IdleAnimation = IdleAnimationObj.Object;
static ConstructorHelpers::FObjectFinder RunningAnimationObj(TEXT("/Game/2dSideScroller/Sprites/RunningAnimation.RunningAnimation"));
RunningAnimation = RunningAnimationObj.Object;
the compile error I got is:
1>------ Build started: Project: test4, Configuration: Development_Editor x64 ------
1> Compiling game modules for hot reload
1> Performing 3 actions (3 in parallel)
1> test4Character.cpp
1>c:\program files\epic games\ue_4.15\engine\source\runtime\coreuobject\public\UObject/ConstructorHelpers.h(109): error C2664: 'void ConstructorHelpers::ValidateObject(UObject *,const FString &,const TCHAR *)': cannot convert argument 1 from 'UPaperFlipbook *' to 'UObject *'
1> c:\program files\epic games\ue_4.15\engine\source\runtime\coreuobject\public\UObject/ConstructorHelpers.h(109): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1> c:\program files\epic games\ue_4.15\engine\source\runtime\coreuobject\public\UObject/ConstructorHelpers.h(102): note: while compiling class template member function 'ConstructorHelpers::FObjectFinder<UPaperFlipbook>::FObjectFinder(const TCHAR *)'
1> C:\Users\userO\Documents\Unreal Projects\test4\Source\test4\test4Character.cpp(17): note: see reference to function template instantiation 'ConstructorHelpers::FObjectFinder<UPaperFlipbook>::FObjectFinder(const TCHAR *)' being compiled
1> C:\Users\userO\Documents\Unreal Projects\test4\Source\test4\test4Character.cpp(17): note: see reference to class template instantiation 'ConstructorHelpers::FObjectFinder<UPaperFlipbook>' being compiled
1>ERROR : UBT error : Failed to produce item: C:\Users\userO\Documents\Unreal Projects\test4\Binaries\Win64\UE4Editor-test4-4772.dll
1> Total build time: 1.79 seconds (Local executor: 0.00 seconds)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3075: The command ""C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat" test4Editor Win64 Development "C:\Users\userO\Documents\Unreal Projects\test4\test4.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
thank you