Get reference to specific component on blueprint for use in actor component


In Unity, I can have a component that has an exposed variable, and I can assign, for example, a collider of my choosing by dragging it into the exposed slot, thereby getting a reference to the exact collider I want to perform logic on in my component.

Here in Unreal, I have an actor component that needs to know which collider (e.g. static mesh, box collision) to perform logic on. I have exposed a variable for this purpose called “Collider”, but I am unable to drag anything from the blueprint onto it. I am also unable to select anything from the dropdown.

Again, I need to be able to select which component is referenced, as there could of course be multiple static mesh components on one blueprint. If this is not possible, which it seems like it isn’t, I would love to hear the next best alternative to what I’m looking for. Someone elsewhere suggested that I have a property to input the exact name of the component I want to grab, and then find the component that way, but this is certainly not ideal.

Let me know your thoughts! This is a bit frustrating coming from how ridiculously easy it was to achieve the same behavior in Unity.



1 Like

Hey, when you create the variable give it a name like Collider Ref
Then click the type and when the pop window appears you need to search for your object type or default class like staticmesh object reference then select the eye like you did. Then you will be able to drag or select any object of that type.

Thanks for the reply. Unfortunately, this does not work, as there are zero results always regardless of what I type. To clarify, I am needing all of this to work within a blueprint, not with objects that are already in the scene.