15 Tips for Clean and Tidy Blueprints in Unreal Engine

  Рет қаралды 39,343

Cobra Code

Cobra Code

Күн бұрын

Support the channel on Patreon:
/ cobracode
Being able to keep your Blueprints clean and tidy is a very important skill to have as a game developer using Unreal Engine.
In this video I will give you 15 tips on how to keep your Blueprints clean, tidy and organized. No more spaghetti code (or nodes).
● Subscribe: / @cobracode
● Twitter: / cobracodedev
UE Component Documentation: docs.unrealengine.com/4.27/en...
UE Blueprint Function Library Documentation: docs.unrealengine.com/4.26/en...
OOP Inheritance Wikipedia: en.wikipedia.org/wiki/Inherit...)
Timecodes:
0:00 Intro
0:22 1. Reroute Nodes
0:39 2. Sequence Node
1:00 3. Enums & Switch
1:31 4. Straighten Nodes and Connections
2:08 5. Consistent Node Layout
2:28 6. Make many Functions
3:07 7. Collapse Nodes
4:28 8. Set Timer by Function Name
5:05 9. Select Node
5:41 10. Comments
6:19 11. Custom Events
6:46 12. Actor Components
7:21 13. Blueprint Function LIbraries
7:41 14. Parent / Child Inheritance
8:19 15. Marketplace Plugins
Icons made by Freepik (www.freepik.com) from Flaticon (www.flaticon.com/)
#cobracode #gamedev #madewithunreal #indiedev #gamedevelopment

Пікірлер: 57
@CobraCode
@CobraCode 2 жыл бұрын
If you're advanced you probably already know a few of these tips so make sure to use the timestamps to skip to the sections you think might be helpful for you and share this video with your friends that have dirty blueprints!
@MagForceSeven
@MagForceSeven 2 жыл бұрын
A good collection of tips. One note on the section about collapsed nodes: You don't actually lose access to local variables when collapsing nodes inside a function. It's true that any of the local variables included in the collapsed selection break, but this appears to be a bug of some sort. If you place a fresh "Get Variable" inside the collapsed node it will work correctly. This allows you to skip having to pass them in like parameters.
@CobraCode
@CobraCode 2 жыл бұрын
@@MagForceSeven Oh that's awesome, thanks for the tip!
@MrKosiej
@MrKosiej 2 жыл бұрын
One of the very useful features for me (and i learned it too late xd) is interfaces. It's basically a way to connect blueprints without having them related. For example, if we wanted to check if an actor is available for interaction, we could cast to it, get the ref, check the variable. Sure, but if we had 10 different, unrelated blueprints (but still had the interaction part in common we'd like to check), we'd have to make 10 cast nodes, check if it's the right actor and then get the variable. If you add more bps it will get pretty messy. Instead you just implement an interface (and set it up), and then you just send a message. If it implements that interface, it will answer.
@elliottberkley
@elliottberkley 3 ай бұрын
Nice list. These are all great tips. I'd add that Alt and Ctrl let you unplug and hold wires or just unplug them. I didn't figure this out until years deep.
@ghislainfontainebujold7834
@ghislainfontainebujold7834 Ай бұрын
Step 4 genuinely blew my mind 😂
@DaBaSoftware
@DaBaSoftware 2 жыл бұрын
Thanks for the resources. The alignment shortcut is awesome!! 😎
@RC-1290
@RC-1290 2 жыл бұрын
I agree with a bunch of these (in fact, I considered making a similar video, and decided to do a search first), but I would like to note that functions and collapsing aren't always better. I always encourage compression based programming, where you only move things to functions when you start re-using a piece of code. Having the full set of nodes in front of you lets you use the spatial parts of your brain, and when something is hidden in a function, you have to imagine it. Sometimes that trade-off is worth it, sometimes it's not.
@CobraCode
@CobraCode 2 жыл бұрын
Thanks for pointing that out! Yeah, I can definitely see an argument to not collapse everything all the time.
@rogermichou8654
@rogermichou8654 Жыл бұрын
"I always encourage compression based programming, where you only move things to functions when you start re-using a piece of code" I do this as well, but the down's side is that some of my blueprint functions are HUUUGE
@johnrex7108
@johnrex7108 5 ай бұрын
Excellent tutorial, man. Thanks for making it available.
@poly_xp
@poly_xp Жыл бұрын
Great video. Straight to the point and informative!!
@cloudliusihui
@cloudliusihui Жыл бұрын
The q shortcut for alignment is super useful! Thx🎉
@kencg6566
@kencg6566 Жыл бұрын
I learned a lot form these tips. Thank you! 👍✌
@Fighter05
@Fighter05 2 ай бұрын
One thing I don't see a lot of people talk about that often is that you can create multiple Event Graphs. Actor components are super common professionally but beyond that its super helpful to keep major parts of BP isolated on their own Event Graphs within a Actor BP or AC.
@tekilla78
@tekilla78 Жыл бұрын
Thank you so much for that movie. It will help a lot with maintaining my code!
@rohanthorat1409
@rohanthorat1409 Жыл бұрын
This was very helpful. Thanks!
@pamparam3495
@pamparam3495 2 жыл бұрын
Thanks, that was the great guide
@klovvin
@klovvin 7 ай бұрын
Excellent content
@LauraVlrs
@LauraVlrs Жыл бұрын
1:10 Gotta admit that this subtle reference made me laugh 😂 Thank you for the advices !
@MichaelDavis-nu3sz
@MichaelDavis-nu3sz 4 ай бұрын
Great content
@KnivesFrank
@KnivesFrank 2 жыл бұрын
Man, do asmr... Thanks for the tip about Timer by function name. Never used that before, always had problems with functions and delay.
@Kinos141
@Kinos141 10 ай бұрын
Good video. I'd also add data assets and data tables. It's the idea of data oriented design over object oriented. It makes dev much cleaner.
@alexboehm7171
@alexboehm7171 Жыл бұрын
01:51 by god this is a blessing. Thank you!!!!!!
@dumpsterfire2985
@dumpsterfire2985 2 жыл бұрын
Thank you thank you so much
@laurino.
@laurino. Жыл бұрын
1:51 THANKSS I LOVE YOU!!! THANKSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS I hate when that happens and now I discover there is a solution :'D I'm going to cry
@laurino.
@laurino. Жыл бұрын
Does someone knows how to do the same with comments? Sometimes they don't align :c
@rifat.ahammed
@rifat.ahammed Жыл бұрын
Thank You
@arkemal
@arkemal Жыл бұрын
Excellent
@user-nw9vq1zx3j
@user-nw9vq1zx3j 2 жыл бұрын
Hey Thanks for the video on blueprints - I liked it very much Do you plan to record any more tutorials?
@CobraCode
@CobraCode 2 жыл бұрын
Thank you, I'm glad you liked it! With my current schedule I'm releasing one video every ~2 weeks and already go the next one lined up to come out December 22nd :)
@romaiiika88
@romaiiika88 2 жыл бұрын
I know most of this tips but still that's a good video we've got there)
@sandermann
@sandermann Жыл бұрын
Great!
@summationx8376
@summationx8376 5 ай бұрын
When you said subscribe, the subscribe button lit up hahahaa
@Alexlinnk
@Alexlinnk 9 ай бұрын
I love you
@tableprinterdoor
@tableprinterdoor Жыл бұрын
1:11 lol I love the yandev meme
@CobraCode
@CobraCode Жыл бұрын
Finally somebody noticed 😅
@couchpotato2751
@couchpotato2751 4 ай бұрын
Helpful tips! Curious how do you add a pinned comment? Like @ 7:35 where it says "Move spawn location forwards a bit". Is this only available in Unreal Engine 5?
@CobraCode
@CobraCode 4 ай бұрын
Hey, you can do that even in UE4. You just need to hover over the node and in the top left it should show a speech bubble with 3 dots
@sym9266
@sym9266 2 жыл бұрын
My brain for some reason wants to think that the computer has to process each reroute node, making the game slower at runtime. It's kinda funny now that I think about it
@aliaksandrandryiashka
@aliaksandrandryiashka Жыл бұрын
Any chance anyone knows the track at 2:40?
@lookichtafer
@lookichtafer Жыл бұрын
Good advice. But I would rather remove 7, 8 and 9. 7 - You create extra graph depth, which is superfluous. If you want, you can create "Tick graph" for example instead of collapsed nodes. 8 - Better not to even try to use any async logic in functions. At a minimum, using the timer only by event will create the same design throughout the project. 9 - The select node doesn't take just one input, it executes all the code on each input and then selects one of the results. It may cause trouble if every input is a complex pure function.
@thecakeisalie6392
@thecakeisalie6392 2 жыл бұрын
Meanwhile your chad computer ignoring the visual mess and yeeting through the code: 🦍💪🏻
@Defenceless_baby
@Defenceless_baby Жыл бұрын
I cant find the vid u referencing in that video one on actor components. 6.52
@CobraCode
@CobraCode Жыл бұрын
Hey, it should be this video kzfaq.info/get/bejne/i9x8hc-by7GYhok.html
@NicolasGagne
@NicolasGagne Жыл бұрын
Is it really optimize to bind event go to a other custom event ?
@CobraCode
@CobraCode Жыл бұрын
Do you mean 'Set Timer by Function Name'? But anyway this video isn't really about optimization, but about making things more readable and easier to navigate. Even if something is slightly less optimized, the improved readability and therefore faster workflow might be a worth wile trade off in many cases.
@philzan3627
@philzan3627 2 жыл бұрын
0:43 be careful with sequence, especially with timings as it will not flow correctly and be out of sync
@CobraCode
@CobraCode 2 жыл бұрын
You mean when using a delay, timeline or something along those lines with a sequence? Yeah I should have mentioned that, thank you!
@michaelybecker
@michaelybecker 2 жыл бұрын
@@CobraCode it's also problematic for asynchronous operations (like calling an API), as one operation can "end" (reach the end of the call) before it actually resolves (usually by triggering a callback function). Basically, much trickier once you have callbacks.
@noahbrewer2476
@noahbrewer2476 Жыл бұрын
I just use sequences, set timers by events and collapse all other excess code into functions.
@DoctorOPlays
@DoctorOPlays 5 ай бұрын
Step by step tutorial to solve world hunger. step 1: become a beginner to unreal engines bps again. step 2: make a procedurally generated backrooms game in bp. if you finished the tutorial you should have solved world hunger.
@zackakai5173
@zackakai5173 Жыл бұрын
Best move I ever made with Unreal was diving into C++. Now when I do use Blueprint node graphs for certain things, it's AMAZING how much cleaner they are. I anyone reading this is serious about Unreal development and hasn't picked it up yet, I can't recommend it enough. I won't say there's no additional learning curve, but if you can write code in Blueprint then you're entirely capable of writing code in C++ (at least as far as Unreal goes). Your node graphs will be cleaner, your games will run more efficiently, there are still things you'll be able to do that you can't do in Blueprint, and you'll generally just gain a much better understanding of how the engine works under the hood.
@SteelRob21
@SteelRob21 Жыл бұрын
Just buy Blueprint Assist plugin
@koyima
@koyima 2 жыл бұрын
tip 1: learn to code
@CobraCode
@CobraCode 2 жыл бұрын
tip 2: Realize that even when you write c++ your code won't magically be clean and you still have to stick to certain principles to make it readable and re-usable tip 3: Realize that you will never be able to ship a game if you spend 80% of your time looking through documentation to see which headers you need to import and wait for your code to compile tip 4: Get frustrated and start working with Blueprints after all tip 5: Realize that c++ and blueprints were supposed to be used together anyway and complement each other tip 6: Come back to this video and learn how to clean up your blueprints
@Jakethunter
@Jakethunter 5 сағат бұрын
@@CobraCodebro got angry
20 Unreal Engine Tips You NEED to know | UE5
8:38
Ali Elzoheiry
Рет қаралды 21 М.
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 12 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 11 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 29 МЛН
How I Remade MW2 with Unreal Engine 5
12:37
reubs
Рет қаралды 3 МЛН
Unreal Engine - Casting and Interfaces Explained
21:31
Reids Channel
Рет қаралды 31 М.
The Most Common Mistake Beginners Make in Unreal Engine | UE5
12:17
Ali Elzoheiry
Рет қаралды 102 М.
25 Tips and Tricks you (probably) don't know about Unreal Engine 5
16:06
Unreal University
Рет қаралды 59 М.
How to Create a Map EXTREMELY FAST in UE5
9:55
Evans Bohl
Рет қаралды 150 М.
ROCKET LAUNCHERS in Unreal Engine
11:05
Cobra Code
Рет қаралды 6 М.
Unreal Engine C++ & Blueprints Programming Design Patterns - Code Like A Pro
22:08
Awesome Tuts - Anyone Can Learn To Make Games
Рет қаралды 15 М.
The State of 2D Game Development with Unreal Engine 5
11:19
Cobra Code
Рет қаралды 46 М.
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 12 МЛН