How can I get a blueprints name? or a class reference to self in a blueprint?

How can I get a blueprints name? or a class reference to self in a blueprint? Thanks

Update: I found a way to do it but will this way work the same after packing? I’m using the “Get Display Name” the non-debugging one is this one ok to use for final game packing?

No, never use the display name to identify actors, or do anything other than debugging.

There are 2 different “display name” nodes, one obviously says don’t use the other doesn’t have a warning… How else would I get the class or blueprint name? thanks

Considering that you want to use a Name property to pull some data from a data table, I would use a Name variable to identify the type I’m working with. It looks like it’s a weapon getting the appropriate Ammo data, in which case it would be “Ammo Type”.

The reason I’m doing it this way is so when the item/blueprint is spawned in the world the blueprint can just get its own class automatically and then grab the right data from the right data table.

How about : event begin play > Get Self> get class > get all actors of class > for each > loopbody> item == self = true > pull data

Thanks for helping me out I really appreciate you taking the time. I just tried to as you said but I still need either the class name or the blueprint name for my blueprint to work. The way above puts me still getting just the actors name not the class. :frowning: any more ideas? How I have it currently setup is if I know the class of the spawned blueprint actor I can use that class to run through each data table I have e.g. weapons, ammo, projectiles, food, etc. If the row name (I made all my row names the name of the class/blueprint) matches great then pull data, if no row found it will jump to check the next data table and so on. I thought the way I’m using works pretty slick so far… I’m packaging my project right now to see if my setup will still work or be broken. If my way works then I guess I’ll just roll with it unless I find a better easier way to do the same thing. Thanks

1 Like

You wouldn’t have a quick example of using tags? or a link? thanks

Hello
Here is a video with good explanation and example : https://www.youtube.com/watch?v=e2rdXo408Q0

1 Like

Thanks for the link. I watched it, and it seems like it can come in handy sometime. It looks like a lot of extra work for what I’m doing, I tested packaging a test project and displaying the blueprints Class Display Name, Object Name and Display Name. The class display name worked after packaging :slight_smile: awesome, at least how I have it setup with chopping 2 off the end of it. As we all already knew the other two ways failed and gave the other object editor assigned name with the added numbers at the end. Thanks to all that read and contributed on this tread because I learned something new on BP Tags etc. :slight_smile:

I attached a picture of the output in the packaged game, my blueprint was named test28 and as you can see it displayed right for the class display name. No matter how many test28 blueprints I drag on to the map the name will never change.