Get Struct Members Without Breaking

I don’t know how involved this would actually be, but it would be nice to be able to get the value of a struct member without breaking the whole struct in Blueprint.

But how would the user pick which member to use?
I think a checkbox to “hide all detached pins” on Break Struct Nodes could solve the visual pollution tho.

I’d be happy if just default behavior of Break Struct would change. Now it displays all the elements of struct, even if you need just 1 out of 30 elements. And when you’re adding new element to the struct later, it’s visible in every place you used Break Struct… It’s a mess…
It’d be easier if none of elements were shown by default. So users would whitelist needed elements instead of blacklisting all unused.

There is Set Members in Struct so there should be a Get Members in Struct too (that would be an inverse of breaking, only showing the pins you tick in the details panel).

I think is possible right now, like this:

The problem with that is the time you waste disabling manually all the pins you don’t want to use.
It’s counter productive.

And you just had to uncheck 3 elements to display only 1, hadn’t you? And if you’d add the 5th member it would be exposed, it’d be visible in the graph.
And it works similar with GetClassDefaults(), it’s annoying. Why I need to care about members I… don’t care? Members I don’t want to expose? :wink:

What about a hide all / show all pins additionally?

I feel like treating struct members like members of any other class would solve all the above issues. We currently don’t have issues getting and setting regular class members, why not have structs work the same way?

That would require a change to the whole Kismet thingy… A way to just hide all unused pins at once, instead, would be trivial to implement.

I don’t think it would require that much changes. UStruct properties are UProperties just like on a UClass, aren’t they?

Yes you are right, but hey don’t blame me for my powefull 4 variables struct, I didn’t write the code for that :p, another option is use a reflection system and access the property by name, but I agree, the bruno’s solution is the best, should be something trivial

Yes! Why is a struct not treated the same way as a class.

I assume that Epic made the members not get-table to differentiate them from classes. Instead I was able to make the necessary code changes to add a “hide all unconnected pins” button to the BreakStruct, please see .

And… the pull request mentioned above just made its way to the master branch :slight_smile: