Unity Script Templates - Changing default script content

preview_player
Показать описание
// Update is called once per frame
I freaking get it, stop showing me!

Don’t put up with the standard Unity templates, make your own! Change the default content in created assets.

=========

Рекомендации по теме
Комментарии
Автор

If you like short ones, I've got two for you.
1 - You can save the files you make with the font asset creator for Text Mesh Pro, so you don't have to remake them every time you start a new project.
2 - If you're like me, when developing a new system, you might make a bunch of new scripts at once. Like say while making an inventory system. You'll need a base item - derivative item types - an inventory - etc. Making them one at a time is slow, as each will force unity to do a reload.
Just open up a script, and deliberately create an error.
You won't have to go through a reload each time you make a new script. Saves a lot of time.

ColdOneK
Автор

Better than a fixed namespace is, to add: #ROOTNAMESPACEBEGIN# and #ROOTNAMESPACEEND#
Then you can set the Namespace inside your Project (Project Settings/Editor - C# Project Generation - Root namespace)

Finalldrace
Автор

I've been needing this for the last 6 years

berk-berk-berk
Автор

Almost 20K, Let's gooo!! Also Code Monkey mentioned your channel in one of his live streams!!

kingbling
Автор

Simple and straight to the point. Thank you!

Shahmuradov
Автор

Super dope! Also really cool that you know Jason Storey, he's really cool imo.

zaurin
Автор

Yeah I found out about this some years ago. What is annoying is, you have to do this ever time to update unity or download a new version. The templates should be shared so you can use the same templates

diligencehumility
Автор

Super cool!
Regarding namespaces, I think I understand the concept but I never find a reason to actually use them, it feels like it adds an unnecessary extra layer of complexity to your project, and if you are going small indie projects it seems redundant…

Would love to see a a video about namespaces and their use.

Other than that I am really enjoying your content man, thanks a lot! Everything is super helpful!

guyginat
Автор

Always learning something new. Your channel is the next best thing since sliced bread. 🍺

zenmasters_games
Автор

Excellent vid, those comments are so annoying haha. I may edit it to just get rid of the start and update function straight away too

DanPos
Автор

Jason also helped me out on some stuff, he's great :) Thanks for the tip bro!

Tharky
Автор

Such a small thing but making life so much better :D. Love it!

PitiITNet
Автор

Good tip, but you can make Visual Studio templates too for Add New Item menu ... super handy thing to know. I create all my new .cs files in Visual Studio anyways.

GameDevNerd
Автор

Another benefit with this would be adding a symlink if you have multiple versions, that way you would only have to change one file/folder once to have it applied to all versions of Unity you have downloaded.
Thank you for the quick tip Tarodev!

crazyconan
Автор

Thank you for the amazing tutorials <3

chaostellar
Автор

Or you can put the "ScriptTemplates" folder inside your "Assets" directory, and changes the scripts as your liking, then just restart the editor. And you are done. It does not matter you update unity or move your code to a different system it should just work.

nikobellic
Автор

It is very cool, but due to being software in constant evolution you are always downloading the next lts versions, and you would have to do it in all of them. Apart from this, one more useful tip. thanks

rafarodriguez
Автор

Cheers, no more correcting new scripts before I can start working with them!

sapientunderground
Автор

Great video! I might add more using statements, so I can delete the ones I don't need.
CTRL+X deletes a Line (uses clipboard)
Shift+Delete does the same (uses clipboard).

Rovsau
Автор

You can also have multiple templates of that and choose which you want.

Shonia
welcome to shbcf.ru