i want to initiate an UInputMappingContext* variable with an asset of the same type but i couldn’t find the c++ code to do it
| static ConstructorHelpers::FObjectFinder mapping(TEXT(/Game/control.control)); | |
|---|---|
| UInputMappingContext* MappingContext = mapping.Object; | |
| if (MappingContext != nullptr) | |
| { | |
| //ConstructorHelpers::ValidateObject(static_cast<UInputMappingContext*>(MappingContext), *mapping.GetFullName(), TEXT(/Game/control.control)); | |
| DefaultMappingContext = MappingContext; | |
| } |
this is the code i used