I am admittedly losing my mind for the past 3 hours on a really silly matter.
I have boxes (SceneComponent) which the player can “pick up” by detecting a mouse click, detecting the boxes via LineTrace, and keeping the box afloat in front of the player (think Half Life gravity gun). Then, the player can let go of the object near a “magnetic hook” and the box will attach to the hook’s SceneComponent via the AttachToComponent() function. This works perfectly fine. Actually, I can even successfully pick the box up again after it has been attached by calling the DetachFromComponent() function. So clearly, the attachment is working.
The issue is, once the player picks up a box, I want to query all attachments the box is involved in so that I may check if the box was already attached to a hook previously or not (so that I may update a progress bar counting how many boxes have been hooked so far). So, when a box is detected on mouse click via Line Trace, I simply get the USceneComponent and I have tried ALL the following functions: GetAttachChildren(), GetAttachmentRoot(), GetAttachmentRootActor(), GetAttachParent(), GetChildComponent(), GetChildComponents(), and more. ALL of them return nothing. I am so baffled by this, any idea what might be the issue? How would you go about checking current attachments?