I just start to learn how to write code in UE. And I follow the instructions of the video"Battery Collector". But there is some syntax that I wrote as the video shows.
Here is the lines in the source file:
WhereToSpawn =
CreateDefaultSubobject(TEXT(“WhereToSpawn”));
RootComponent = WhereToSpawn;
I still comfused why the compiler keep telling me that casting UBoxComponent* to USceneComponent* failed!!!
I hope someone can tell me where I did wrong!