I have been trying to figure out how to set an object reference variable I made, with an object that is in my scene, attached to the parent object my blueprint is in.
I am a few days new to Unreal, I come from Unity originally, where you can just drag in scene object references. I have not been able to find this same behavior here.
I did online searching on the subject, and the conclusion was that this is not allowed in UE because you cant guarantee a valid reference. But you can when its in your scene and attached as a child. I am confused about this.
I know that I can just drag the reference onto on an init event i create that takes the reference. But if I am initializing a large array with many values, that is a lot of blueprint setup using “set” which could be avoided if I was allowed to drag references in the variables section of the blueprint details.
What am I missing?
Hey there @anonymous_user_d8b497ee! Welcome to the community! So you can absolutely drag an actor reference directly to an Actor variable as long as it is an object reference. For example, just make your variable public/visible by clicking the eye on the right of the var in your BP. Then compile.

Then in your scene you can just lock your selection, then drag and drop it. Same with arrays!
Gif example:

Is that what you mean?
Thanks for the quick response!
I more so meant from the components list inside lets say a Pawn

Here I want Hover to have reference to EnergySystem, but cant drag it on.

Ahhh I see what you mean! You’re correct that UE doesn’t do object references to internal components like that. Since those components are a part of the actor they can natively access it directly anyway. Though I definitely agree that setting up that boilerplate isn’t the best, if you prepare it well you only have to have one init function to cover it all (unless you have a really deep customization system then it gets a little blurry on best practices).
1 Like