50 Unity tips you MUST know!!!
HTML-код
- Опубликовано: 19 ноя 2024
- In this video, we go through 50 astonishing Unity tips that will take your game development skills to the NEXT LEVEL.
While some might consider the contents of this video are only for beginners, I'm sure that both beginners and intermediates could benefit from the video and learn a ton of new things.
But if you've been around for longer than 10 years... what are you doing clicking on youtube videos? you should be working on GTA XVIII now.
--------------------------------------------------------------------------------------
Join Us on DISCORD!!!
/ discord
--------------------------------------------------------------------------------------
Leave A Comment Too, JEREMY!
Thanks Jeremy, this is really useful for speeding up my workflow
Happy you found it useful,
Jeremy was actually sort of a joke at the end of the video.
my name's not Jeremy
Really great video, tons of super useful tips!
True pleasure getting a compliment on one of my relatively bad videos from one of the goats of the industry💥
The GOAT!
I've been using Unity for more than 5 years and still learned something new from this video. Good job! Subbed! :)
Glad it was helpful, thanks for the sub.
wow, for a 5 minute video this is a gold mine for a new dev. thanks man you just earn a new subscriber
The Ctrl Alt P frame by frame made my mind go 🤯🤯🤯🤯🤯
Nice, but the most important tip for programmers is ctrl+c and ctrl+v
I knew I was missing something
And ctrl+z when you fuck up
this is wrong, the right way is ctrl+CCCCCCC then ctrl+V
@@ravz7286 yeah almost the most correct way is: click and drag with the mouse to select everything you want to copy then we your strategy Ctrl+CCCCCCC and then Ctrl+V
Ctrl+y if you accidentally undo it
huge tip - record your voice overs in a less reflective space
massively improves audio quality for a fairly simple fix
cheapest way to do it is to cover tiles/glass with fabric while you record if you can't move your setup as easily.
Might also benefit to invest in a shotgun mic.
Thank you for the tip man, I already got a semi decent mic.
Hope you've subbed, I'm working on something fun👌
Dani you've changed, welcome back XD
Great work Bro !
loved your video !
Glad you liked it!
I have the opposite problem - good at art, never written a line of code in my life. Let's work together!
Hi, thanks for reaching out, message me on discord, let's have a little conversation!
My username on discord is "goldendevs".
Great tips man, you deserve more subscribers
Underrated channel, keep it up man! Clean your camera lens next time tho.
Thanks man, it's a poor quality camera, I'll try to tweak some settings next time
Awesome I'll let my neighbor Jeremy know
Lol, thank you
Wow. This is my first time seeing Invoke. I learned something new today thanks to you.
Glad it was helpful
Very good tips! Some of these took me longer to find out about than I'm proud of 😅
Glad it was helpful!
i thought your shirt said rape
😮
Loved your video, hope you can improve your mic as I cannot hear you very well, and I couldnt understand some things
Thanks, I just bought a new mic stay tuned for the next video
@@GoldenDevs Great!!
My jaw dropped... This video is Amazing. Thank you so much!!
Thank you for the kind words man
never know about sub tag before, Thank you!
Ctrl+shift+n for new empty object.
That's useful!
I thought about making a video like this. Now there's no need. Wonderful job! Much better than i would've done.
Happy the content was helpful,
Also cool username.
Key Notes:
01. While right-clicking the SceneView, use W/S to move forward/back, A/D to move left/right, and Q/E to move up/down. (WASD + QE controls!)
02. Alt+Arrow keys move a line of code in your IDE up/down.
03. Set up multiple layouts for different workflows: E.g. One for Animation, one for gameplay, one for rendering, one for navigation, etc. Makes it easy to switch to different ideas/workflows!
04. Use Invoke() to simply call a function at a fixed wait time. Much more simple than setting up a couroutine.
05. Use InvokeRepeating() to call a function on a loop after a fixed wait time. Much more simple than setting up a couroutine.
06. When using a function that passes in the name of a variable/function/etc as a string, use nameof() to get the name of it as a string. This ensures no spelling related issues and if you later rename it, it will correct itself!
07. Selecting renamable object/function and hitting F2 will allow quick renaming of it.
08. Join a game development Discord. (self-promo)
09. CTRL+SHIFT+N makes a new GameObject in the hierachy.
10. F focuses on a selected GameObject in the SceneView. SHIFT+F to focus and follow.
11. CTRL+SHIFT+F aligns a GameObject to the position and rotation of the SceneView camera. (Great for aligning cameras and vcams!)
12. C switches from Dopesheet to Curves and back in the Animation tab.
13. The question mark icon opens the documentation of a component in the browser.
14. CTRL+K+C to comment block a section of code in your IDE (vscode, etc).
15. CTRL+K+U to uncomment block a section of code in your IDE (vscode, etc).
16. Typing the keyword of an 'if', 'while', or 'for' and hitting tab twice auto-completes it.
17. CTRL+P to enter Play Mode.
18. CTRL+SHIFT+P to pause Play Mode.
19. CTRL+ALT+P to advance frame-by-frame in Play Mode.
20. Navigating to 'Edit>Shortcuts' allows you to see and modify all of the current shortcuts available to you.
21. [SerializeField] attribute added on to a variable makes it serializable and therefore viewable in the inspector, even if it is private/protected!
22. [HideInInspector] attribute added on to a variable makes it invisible to the inspector, even if it is public.
23. Use empty GameObjects to divide the Hierarchy into sections. You don't have to make all of the objects children in the catagories, since this can often cause world/relative space issues, etc.
24. [Header("TEXT GOES HERE")] attribute added on to a variable divides the inspector variables into sections making it easier to see and manage.
25. [Space(int/float)] attribute added on to a variable divides the inspector variables with vertical space making it easier to see and manage.
26. You can drag-and-drop another scene into the hierarchy to make copy-pasting from one scene to the other easier.
27. [Tooltip("TEXT GOES HERE")] attribute added on to a variable adds text for the user to see after hovering, making it easier to understand the purpose of the variable.
28. [Range(int/float, int/float)] attribute added on to a variable narrows down the potential serialized values that the user can set the variable to within the confines of the range. It also give the UI a slider in the inspector.
29. [Min(int/float] attribute added on to a variable narrows down the potential serialized values that the user can set the variable to above the minimum. It does not give the UI any slider in the inspector. There is no max attribute.
30. In the Layers drop-down menu, in the top-right corner, the eye icon disables what layer can be seen in the SceneView. Likewise, the touch icon disables what layer can be selected/pickable in the SceneView.
31. Eye/touch icons in the hierarchy have the same functionality as #30, but on a per GameObject basis.
32. When creating a new layer or tag, using a slash (/) in the name creates a submenu and item when selecting a layer or tag.
33. #region and #endregion creates a region of code in your IDE, that makes it easy to hide sections to make finding/organising stuff easier and faster. Placing text after the #region names it.
34. Clicking the hamburger menu (three dots) icon on the scene and navigation to 'Discard changes' reverts back to the last saved copy of the scene (wipes the Undo History).
35. (self-promo)
36. Set up a Tags class script to avoid spelling-related issues that can happen when using string literals. E.g. better to use Tags.player than having to manually type "Player".
37. Use gameObject.CompareTag("tagName") instead of gameObject.tag == "tagName". Combine with tip #36 for some solid code!
38. In the Assets tab, you can click the shapes icon to search for assets of a type. CLICK on a type to search it, or CRTL-CLICK to search muliple types (which broadens the search types, it doesn't narrow it)
39. Use the Undo History button (top-right corner) or use CTRL-U to access the Undo History tab. Clicking on any of the items in the buffer will undo all of the changes to that point in time.
40. Use Debug.Log(), Debug.LogWarning(), and Debug.LogError() to make and send a message (and specify the severity of it) to the Console tab when in Play Mode. Makes it much easier to debug code behaviour while in Play Mode.
41. Navigate to 'Edit>Preferences>General>Script Changes While Playing' to change what happens when the code is changed during Play Mode. Default is 'Recompile And Continue Playing', but this can cause null-reference errors.
42. Use the sliders icon button in the component's header to save and load custom component presets.
43. [ContextMenu("TEXT")] attribute makes a button that execute a function when pressed in the Editor, in or out of Play Mode. This button is found when right-clicking the component header, or with the hamburger menu (three dots) icon.
44. Navigate to 'Edit>Project Settings>Editor>Numbering Scheme>Game Object Naming' to select your naming/numbering scheme preference for when you make multiple copies of a GameObject or Prefab.
45. Change Application.targetFrameRate to limit the frame rate of the game while playing. This is useful for debugging frame-timing related issues. Be careful to not ship the game with this. Make an in-scene GameObject to manage this.
46. Navigate to 'Edit>Project Settings>Time' to manage the default FixedUpdate()/Physics Timestep interval, particle Timestep, and overall Time Scale. Useful for increasing the amount of FixedUpdates are in a second and more.
47. Use the ternary operator (?) to set a variable, rather than using if statements to conditionalize it. E.g. string variable = (condition) ? "VALUE IF TRUE" : "VALUE IF FALSE". Ternary operators can be nested, too!
48. Time is money; When you can buy a useful asset for cheap, do it if it will save you a greater amount of time or money for your project, rather than making your own solution.
49. Use a TO-DO list (Trello board, etc) to organize your project step-by-step, so you don't get lost.
50. Use Cinemachine for controlling and managing your camera. It's very versatile and it can get you exactly what camera effects you need for your game.
Here if anyone wants it. I recommend writing them down yourself by hand since they'll probably be easier to remember that way.
Thank you for doing this, appreciate it
As a beginner game dev, thank you for the tips!
(I'm also sending this to my friend Jeremy who doesn't use Unity)
Lol, awesome, thanks for the feedback, good luck with your journey
CTRL RR was magnificent !!
thanks dude, i learned a few things. Im making a game. Im an indie dev.
Glad I could help!
very nice video. Earned a new sub dude.
Thanks, welcome to the community
Can’t wait to forget all 50 of them after in an hour :P
i forgot them as soon as the video ended
Very informative video, but what happen to your camera lens 😂😂😂😂
The best way to learn something is learning it 50 Tips at a time 😅
Great video buddy
Thanks for sharing! great video!
if u get a mic ur gonna be more famous than brackeys.
Thanks for the kind words man!
I already got a new mic, in fact a new video is coming out this Saturday!
gotta check it!
keep rocking
legit so helpful omg
Cool :)
nice thumb and editing!
Thank you, hope the content was helpful.
now i feel like im pro thank you buddy
This is so cool , thanks for the video
Thank you for watching, glad you liked it, join our discord server too if you like 👌😁
Useful tips , thanks!
Amazing ;-) Wish I watched this a few years back
Useful video man,subscribed
Happy you liked it!
Well prepared! Thank you guys!
Thank u for this good information ❣
But just if u can fix the voice noise it will be perfect
Happy the content was helpful.
Yes I'm buying a new microphone thanks for your feedback.
Great Vid, It’d help if the pacing was a little slower though
Feel free to watch at half speed
😂
Good video man!
Thank you, Happy you liked it
Unable to join your discord channel. Have some development related questions regarding my game. Need help.
I already saw your welcome message on my discord server
I doubled checked if I was on RUclips when I saw the guy.
Why? Am I just that pretty?
Very good video. ❤
Glad you liked it!
Very useful tips, but had a hard time understanding your voice there sometimes.
Thank you, yeah I didn't have a good mic back then, hope you learned something tho 💛
It's been 7 months into game development and i can't believe I know all of this things before watching the videos except undo history and I knew about Cinemachine but i didn't know it was literally replacement for camera follow script
Wow, nice progress man
@@GoldenDevs no man this is no progress at all I can't make games like him or any other youtuber yet like i feel like I'm way way slower at learning this i have been doing it full time daily 8 hours plus travel of 2 to 3 hours it's like every other video about gamedev is that I made this in a year and here I am just making two games at 7 months idle game and hidden object that is it
@@theshadowunity8260 hey man, I know it's tough sometimes but don't let them get in your head - every video you see a out people making a game in year or less - there is 20 people who just learn basics in that time. We only see those who are successful with their goal, and have something to show to their subscribers. Everyone learns things at different pace, for example it took me almost a week(a few hours a day) to set up proper movement and camera follow script just because it's the way I wanted to learn. I could open tutorials and copy paste the code but I spend some time understanding it from scratch so now I have full understanding how to do it. So just take your time to do something. If you are working 8 hours a day, you may need to take a break. Seriously, I'm sure you know the feeling of staying awake till 3 am fixing that bug, giving up and going to sleep with completely destroyed mentality only to wake up and find a solution in 5 minutes. So, maybe that's what you need to speed things up. Take care man
Excellent content, but, the pacing could've been better.
You should definitely upload more often.
Working on it!
@@GoldenDevs Another thought that crossed my mind was that you could use "chapters" to clearly differentiate between the time frames of each tip and also show the chapter names. This would allow us to more efficiently search for a particular tip when we reopen the video to see something that we've forgotten (just happened to me lol).
same here
İts look like breckly videos but you should change your cam :D
'Invoke' is reflection 🤔🤔
For the love of all that is holy, don't use Invoke.
what is the best book for learning c# for games without unity just basic, advanced and c# programming
I haven't read any books on c# but murach's C#, which was a good book, I wouldn't know if it's the best one
Just started getting into game dev and im curious, why compare tag instead of ==? Is it an optimization type thing or is it just better in general?
Optimization
this is gold
This is so helful !
I needee this video sooooo much 😮😮😮
SO half of these are tips for whatever your specific code editor is...
Yeah I keep switching between vs and rider, but most people use vs, specially beginners so I didn't want to confuse them too much.
someone of these "tips" for unity, are mostly functions of Visual Studios IDE.
Wow @ Tips 32
Happy the video is still helping people
Great video. However most of your code editor tips are VS Code specific. They probably work differently is other editors. For instance, renaming a variable. In Visual Studio or Rider you would right click on the variable and select refactor->rename. That will rename the variable through out your project. I would maybe just point out that they only work in VS Code.
Thank you, You are absolutely right, I will remember that for the next time I do a video like this
Not true. Rename shortcut (as much more similar) is available on many of IDEs, including a Rider. Maybe you don't replicate the shortcut as it should be. The SC is: Ctrl+R+R (press "R" TWICE). Use SCs correctly)
4.1 for better invoke performance use async
Bro I can't watch your full video because of voice plz fix it 😢
Well I can't do anything about that video, but I already bought a microphone, I'm publishing the next video which is how to make a health bar this week, so keep an eye out
Improve your voice btw tips are amazing 🤩
Thank you for the feedback, I already have, check out my latest video if you got the time, happy you liked the content
Jeremy rn: :'(
Lol
5:17 wtf is this tip
Bro's filming with a nokia
Haha, The og nokias don't have cameras
Hmm some of these aren't unity
You're right
control RR?
Yes, ctrl+r+r for renaming
Ok thanks
thought it was a J.R.R Tolkien joke
😂