Download

Actor class reference - accessing properties

Hello,

Following scenario. I am populating a list of item classes the character can build. These are stored as a Class reference. For the widget displaying it I would like to access some of the properties within this actor like some meta information about its type etc.
For this I need an object reference.

My ugly way of doing it at this moment, I will spawn temporarily an actor based on that class reference (in a random location without collision, and 0.01 scale), store its properties I want as a variable and than destroy the actor. With the variables I will populate my widget.

There has to be a better way. Any ideas how to handle that better?

Best

Try this. Or you could even store a soft class reference, here’s a great post:

https://answers.unrealengine.com/questions/879172/can-someone-explain-soft-variable-references.html

Thanks - that worked beautifully!

1 Like