Hi,
Downloaded UE 4.4 yesterday started creating my project from scratch, copied all my code over, however the HUD drawing code provided in the Third Person C++ Tutorial no longer compiles.
This HUD code has worked as is in 4.2 through 4.3.1 and is from the video tutorial.
UCLASS()
class TEST1_API ATest1InfoHUD : public AHUD
{
GENERATED_UCLASS_BODY()
This code was using the Canvas property from parent class AHUD to obtain the screen size however this code now gives the following compiler error
1>D:\Development\Unreal Projects\Tutorial\4.4\Test1\Source\Test1\Private\Test1InfoHUD.cpp(34): error C2027: use of undefined type 'UCanvas'
1> D:\Unreal Engine\Unreal Engine\Unreal Engine\4.4\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(1938) : see declaration of 'UCanvas'
1>D:\Development\Unreal Projects\Tutorial\4.4\Test1\Source\Test1\Private\Test1InfoHUD.cpp(34): error C2227: left of '->SizeX' must point to class/struct/union/generic type
And in VS2013 it unders lines Canvas with a red squigly
If I remove the code referring to the Canvas property, I now get another error for obtaining the Font in the constructor
static ConstructorHelpers::FObjectFinder<UFont>HUDFontObj(TEXT("/Engine/EngineFonts/SmallFont"));
The compiler error is
1>D:\Unreal Engine\Unreal Engine\Unreal Engine\4.4\Engine\Source\Runtime\CoreUObject\Public\UObject\ConstructorHelpers.h(92): error C2664: 'void ConstructorHelpers::ValidateObject(UObject *,const FString &,const TCHAR *)' : cannot convert argument 1 from 'UFont *' to 'UObject *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1> D:\Unreal Engine\Unreal Engine\Unreal Engine\4.4\Engine\Source\Runtime\CoreUObject\Public\UObject\ConstructorHelpers.h(85) : while compiling class template member function 'ConstructorHelpers::FObjectFinder<UFont>::FObjectFinder(const TCHAR *)'
1> D:\Development\Unreal Projects\Tutorial\4.4\Test1\Source\Test1\Private\Test1InfoHUD.cpp(18) : see reference to function template instantiation 'ConstructorHelpers::FObjectFinder<UFont>::FObjectFinder(const TCHAR *)' being compiled
1> D:\Development\Unreal Projects\Tutorial\4.4\Test1\Source\Test1\Private\Test1InfoHUD.cpp(18) : see reference to class template instantiation 'ConstructorHelpers::FObjectFinder<UFont>' being compiled
Again, this code worked fine before 4.4 release.
Any help gratefully received