Hi, I want to set these settings in C++ , how to do this?
What I am Trying is: but not working correctly
auto& Property_3 = (*(AccessPrivateProperty<FCollisionResponse >(&(Box->BodyInstance), FBodyInstance::PPOCollisionResponses())));
auto& Property_4 = (*(AccessPrivateProperty<TArray<FResponseChannel> >(&(Property_3), FCollisionResponse::PPOResponseArray())));
Property_4 = TArray<FResponseChannel>();
Property_4.AddUninitialized(9);
FResponseChannel::StaticStruct()->InitializeStruct(Property_4.GetData(), 9);
auto& Property_5 = Property_4[0];
Property_5.Channel = FName(TEXT("WorldStatic"));
Property_5.Response = ECollisionResponse::ECR_Ignore;
auto& Property_6 = Property_4[1];
Property_6.Channel = FName(TEXT("WorldDynamic"));
Property_6.Response = ECollisionResponse::ECR_Ignore;
auto& Property_7 = Property_4[2];
Property_7.Channel = FName(TEXT("Pawn"));
Property_7.Response = ECollisionResponse::ECR_Ignore;
auto& Property_8 = Property_4[3];
Property_8.Channel = FName(TEXT("Visibility"));
Property_8.Response = ECollisionResponse::ECR_Ignore;
auto& Property_9 = Property_4[4];
Property_9.Channel = FName(TEXT("Camera"));
Property_9.Response = ECollisionResponse::ECR_Ignore;
auto& Property_10 = Property_4[5];
Property_10.Channel = FName(TEXT("PhysicsBody"));
Property_10.Response = ECollisionResponse::ECR_Ignore;
auto& Property_11 = Property_4[6];
Property_11.Channel = FName(TEXT("Vehicle"));
Property_11.Response = ECollisionResponse::ECR_Ignore;
auto& Property_12 = Property_4[7];
Property_12.Channel = FName(TEXT("Destructible"));
Property_12.Response = ECollisionResponse::ECR_Ignore;
auto& Property_13 = Property_4[8];
Property_13.Channel = FName(TEXT("Land"));
Property_13.Response = ECollisionResponse::ECR_Ignore;
Box->SetCollisionProfileName(FName(TEXT("Custom")));
Thank You.