[Feature Request] Make default value reference "self"

It would be really convenient if we could mark a reference value’s default to be “self” like many of the built-in engine nodes, via a simple check mark.

Edit: This would be instead of it saying, “Select asset”.

Provide 3 examples where self would be a good default (where its not ofcourse)

I would like the ability to add default values to input pins.

For the whole Self thing though, there are two things you could do right now:

  1. You could create this function, on a
    parent class of your Objects, then
    all classes that inherit from this,
    would by default have the input pin
    for Target Object, which then by
    default is self unless specified.
  2. You could check the input Object and see if it IsValid, and if not, use Self.

Yes! Please! This would be very helpful in doing our log debug function as recommended in this great video: How to debug your game | Live from HQ | Inside Unreal - YouTube

1 Like

If anyone is wondering how to use self in a shared blueprint library (it’ll throw an error if you try to use a Self reference), you can get a variable called World_Context, and then cast that to Actor or whatever you like, so you can for example, GetActorLocation etc without having to pass through your own Self reference manually with a Target input.

What? If I’m making a blueprint library, for functions that many actors can use “such as get backwards vector,” it’ll be handy to have it default to “self” instead of me having to wire in the same value again and again. There’s an indefinite number of use cases when building a function library.

I feel like I shouldn’t have to justify it more than that.

@Spoondog’s solution works however, as a workaround.

1 Like

+1 for this. I want it as well.