I have the following code:
UAudioComponent *foo = CreateDefaultSubobject(TEXT(“FUBAR”));
It keeps generating the following errors:
2>C:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\CoreUObject\Public\UObject/Object.h(83): error C2027: use of undefined type ‘UAudioComponent’
2>C:\Program Files\Epic Games\UE_4.16\Engine\Plugins\Online\OnlineSubsystemUtils\Source\OnlineSubsystemUtils\Public\OnlineSubsystemUtils.h(17): note: see declaration of ‘UAudioComponent’
2>C:\Storage\SSD2\UE4Projects\MicInput\Source\MicInput\MicCharacter.cpp(20): note: see reference to function template instantiation ‘TReturnType *UObject::CreateDefaultSubobject(FName,bool)’ being compiled
2> with
2> [
2> TReturnType=UAudioComponent
2> ]
2>C:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\CoreUObject\Public\UObject/Object.h(84): error C2440: ‘static_cast’: cannot convert from ‘UObject *’ to ‘UAudioComponent *’
2>C:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\CoreUObject\Public\UObject/Object.h(84): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Any Suggestions what I am doing wrong?