Guys I wanted to create an abstract method; however, compiler gives me error. Is it not possible to create one or there is another way rather than the pure c++ coding(e.g. UFUNCTION(bla bla))?
Abstract Class:
UCLASS(abstract)
class THECLOUDGAME_API AGround : public AMovingPawn
{
GENERATED_UCLASS_BODY()
protected:
virtual TArray<AGround*> GetFollowingGrounds(void) = 0;
};
Error:
1>C:\Users\ErayT\UnrealEngine\UnrealEngine_4.3\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(2151): error C2259: 'AGround' : cannot instantiate abstract class
1> due to following members:
1> 'TArray<AGround *,FDefaultAllocator> AGround::GetFollowingGrounds(void)' : is abstract
1> C:\Users\ErayT\Documents\Unreal Projects\TheCloudGame\Source\TheCloudGame\Elements/Grounds/Ground.h(23) : see declaration of 'AGround::GetFollowingGrounds'
1> C:\Users\ErayT\UnrealEngine\UnrealEngine_4.3\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(2189) : see reference to function template instantiation 'void InternalConstructor<TClass>(const FPostConstructInitializeProperties &)' being compiled
1> with
1> [
1> TClass=AGround
1> ]
1> C:\Users\ErayT\Documents\Unreal Projects\TheCloudGame\Intermediate\Build\Win64\Inc\TheCloudGame\TheCloudGame.generated.cpp(30) : see reference to function template instantiation 'void GetPrivateStaticClassBody<AGround>(const TCHAR *,const TCHAR *,UClass *&,void (__cdecl *)(void))' being compiled
1>