Blueprint: How to reference self in scene

Hello. I want to create a blueprint so whenever you place it into the scene, it’s script references itself in runtime so I don’t have to make a bunch of different blueprints for each object.

You can generally always get a reference to self in blueprints by right-clicking in the graph and searching for “self”, this will pop up a Get Reference To Self node.

1 Like

This doesnt work as it shows it as a blueprint, not a scene object

A blueprinted actor’s self will always refer to itself as an actor in the world that has a class of your blueprint’s name which is a subclass of some form of Actor or Actor itself.

“self” in a blueprint, unless its some form of non-Actor blueprint like a Blutility, will always refer to the instance of itself. Things in the content browser alone have no proper sense of ‘self’, at least not directly accessible in this way.

Now if you were wanting a reference to something inside the blueprint, like a scene component, then you can simply drag the variable matching the component name from the “My Blueprint” window into the graph window and choose “Get”.

But then if I spawn one, it doesn’t have a refrance

Spawn funtion return refrence