Download

Could I Modify the Default SubObject

UClass *GetWheeledVehicleMovementComponentClass(const FObjectInitializer &ObjectInitializer)
{
    UClass *MovementComponentClass = nullptr;
    ABP_PlatformEquipBaseOnWheeledVehicle *InitParamsObject = Cast<ABP_PlatformEquipBaseOnWheeledVehicle>(ObjectInitializer.GetArchetype());
    if ((InitParamsObject == nullptr) || (InitParamsObject->MovementComponentClass == nullptr))
    {
        MovementComponentClass = UWheeledVehicleMovementComponentNW::StaticClass();
    }
    else
    {
        MovementComponentClass = InitParamsObject->MovementComponentClass.Get();
    }
    return MovementComponentClass;
}

ABP_PlatformEquipBaseOnWheeledVehicle::ABP_PlatformEquipBaseOnWheeledVehicle
(const FObjectInitializer &ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass(AWheeledVehicle::VehicleMovementComponentName, GetWheeledVehicleMovementComponentClass(ObjectInitializer)))
{
}

How Can I Modify the DefaultSubObject for AWheeledVehicle::VehicleMovementComponentName , When I Changed the MovementComponentClass by Blueprint Default Setting