var skeletonAnimation = roleAnima.GetComponent<SkeletonAnimation>();
var slot = skeletonAnimation.Skeleton.FindSlot("arrow");
slot.Attachment = null;
That is equivalent code.
What this does is set the active attachment of your "arrow" slot to null.
If your animation keys the arrow attachment, that is also equivalent to the runtime saying slot.Attachment = arrow
.
This is important to remember when you're doing stuff like this: your animations can override your changes.
So if you want something to be under the control of your code, you need to
a. not key it in your animations, or...
b. set the slot attachment every frame (and in the phase of the frame after the animations are applied). or...
c. play animations that key the attachments. (for example, a separate animation that only hides the arrow attachment in the arrow slot, played on track 1).