r/programminghorror • u/TemporaryCurrent1172 • Apr 09 '26
Blueprint Spaghetti Code
Welp, my code in blueprints... kinda looks yummy
(Blueprint is a type of visual coding in unreal engine just so you guys know)
791
Upvotes
View all comments
Show parent comment
1
u/duffking Apr 10 '26
Yeah, there's a lot of odd impracticalities with Blueprint. It is/can be extremely powerful, but personally I think it's best suited only for additions/extensions to your core code.
You can of course build larger systems with it but you need to be very disciplined about all the gotchas - I mentioned in a post below it's really easy to accidentally execute notes way more than you need, for example.
But the biggest one is the way that since BPs are uassets, Unreal can't access the functions defined in them without loading the asset itself. Which means if you ever cast to a blueprint type, use it as a function pin, variable type etc, loading your BP will also load that BP, and all its dependencies. It can spiral very quickly.
Not to mention that any functions you define in BP can't really be executed from code as a result. Personally I like to give everything a C++ base class for safer casting if it needs to be done, and more easily nativising stuff.