Is it possible to get Mesh out of Class Ref

Hey, im rather new to Ue4 and i would like to ask if its Possible to get a Mesh out of a Class Reference?

did a bit of looking and it doesnt seem like something thats possible. in your case though you could jsut have the mesh as part of your struct.

hmm yeah thats the way im going with right now.
seems like i have to keep it that way.
Thanks anyways

It can be done if your class reference is specific and if the “mesh” is a variable in that class. The variable issue isn’t a problem, neither is making a class reference. This should work if you have all your weapons parented to a master class. So basically create a master class, create child blueprints from it for all your weapons. In the master class create a variable to change the mesh. Once you have that in your struct specify the class variable to be “master weapon” then you will be able to pull the mesh out of the default variables and set it.

get class defaults for some reason doenst show different Mesh and Texture type variables…

Yea that’s odd. However, I just tested this and you are able to get Mesh and Texture data from class defaults out of a struct. So just store all that stuff in one struct variable and you will be able to break it and get the necessary info.

1 Like