Why are Structures so painful to use!?

Hey. I actually love using structures, but I was wondering why do they cause compiling errors if I were to add something new to them? What’s the reason behind it? I’d love some detailed explanation if anyone knows!

Interesting question… You do see bug fixes related to Structs in release notes quite often iirc. It makes you wonder if its several different things. Are Structs different to data-only classes under the hood? Maybe @Bruno_Xavier or @Jwatte or other C++ vet can offer some insights…

But for sure, if you’re seeing strange packaging errors, compiler errors, crashes or Blueprints corruption that doesn’t make any sense after editor / machine reboot… Its often a good idea to eliminate Structs first as the possible cause, and see if that magically fixes things imho.

Overall avoiding Structs altogether if you can and using other methods such as data-only classes / arrays / enums / strings can guarantee more stable code (less crashes). But why? Is it something to do with the way Unreal handles mem allocation / pointers unique to Structs?

Unrelated completedly Off-Topic question: What part of your city is the safest / nicest for tourists to stay in if you feel like saying and offering some advice? Cheers in advance. :+1:

2 Likes

Yeah I wonder…

I decided to PM you since I wrote quite a bit x)

2 Likes