AActor::AttachmentReplication is inaccessible

AActor::AttachmentReplication is declared as private but OnRep_AttachmentReplication is virtual so the function can not be overridden and use the AttachmentReplication property as it is inaccessible to inherited classes. Please change the AActor::AttachmentReplication property to be Protected from Private.

You got something wrong, if function is virtual you can override while without it you only hide function

virtual void OnRep_AttachmentReplication() override;

will do the thing

If you really want to change access you can do that yourself by editing engine source code or submit push request but then you need to make solid reasoning behind it. In C++ if varable is private that means there diffrent way to accessing it via function which work like gate keepers, you can at least red that variable via AActor::GetAttachmentReplication | Unreal Engine Documentation

If I create an inherited class from AActor and I overwrite the function OnRep_AttachmentReplication, I can not use the AttachmentReplication property that triggered the replication function because it is private in AActor (the parent class). So, it makes overriding the OnRep function useless because there’s nothing I can do to change the behavior of AActor for the AttachmentReplication property. If the property were protected, then having the OnRep virtual makes sense because I can then have a child class that can use the variable. I did already change the source, btw, which is no big deal. I think that it’d make sense for the standard engine to have this change as well so that a child class can have access to the AttachmentReplication property of AActor and then overriding the OnRep makes sense. Ultimately, that is up to you guys, though. I’m just the messenger in this case.

But you want to set that variable?