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.
@Finalldrace3 жыл бұрын
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)
@Tarodev3 жыл бұрын
That is indeed better. Good tip!
@nguyeninhtai52443 жыл бұрын
Can you show the example? I can't get it :((
@berk-berk-berk3 жыл бұрын
I've been needing this for the last 6 years
@kingbling75713 жыл бұрын
Almost 20K, Let's gooo!! Also Code Monkey mentioned your channel in one of his live streams!!
@Tarodev3 жыл бұрын
omg WHAT? What did he say??
@kingbling75713 жыл бұрын
@@Tarodev Someone asked him which Great Unity YT Channels he follows and he starting listing some and you were one of them as well :P He also mentioned he recently found it and that it had some amazing videos that one should watch if they have time. Ik this is great n all, but I know you can reach over 100k in coming time! Let's goooOoOoOo
@Tarodev3 жыл бұрын
@@kingbling7571 Mind blown. I've been watching CM for so long and it's insane to think he knows I exist, lol!
@kingbling75713 жыл бұрын
@@Tarodev yup, must be an amazing feeling. Well u do deserve some recognition after all. Also don't forget that I exist when you grow large, jk lol
@zaurin96503 жыл бұрын
Super dope! Also really cool that you know Jason Storey, he's really cool imo.
@Tarodev3 жыл бұрын
He's alright I suppose
@Shahmuradov3 жыл бұрын
Simple and straight to the point. Thank you!
@diligencehumility69713 жыл бұрын
Yeah this channel is quite good
@Tarodev2 жыл бұрын
Thanks boys
@Tharky3 жыл бұрын
Jason also helped me out on some stuff, he's great :) Thanks for the tip bro!
@crazyconan282 жыл бұрын
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!
@DanPos3 жыл бұрын
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
@diligencehumility69713 жыл бұрын
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
@Tarodev3 жыл бұрын
Absolutely agree. I suppose it's not because they may change bits and pieces from the templates.
@Vastlee3 жыл бұрын
Was going to reply the same thing. There's no reason for it either. Unity could easily store it in the user profile of the machine. Such a simple fix.
@zenmasters_games3 жыл бұрын
Always learning something new. Your channel is the next best thing since sliced bread. 🍺
@Rovsau3 жыл бұрын
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).
@buzatusebastian2735 Жыл бұрын
and shift delete also deletes a line without storing it in the clipboard
@Rovsau Жыл бұрын
@@buzatusebastian2735 Thanks! I'll update that in my post.
@buzatusebastian2735 Жыл бұрын
@@Rovsau nvm shift del still stores the line in the clipboard wow. Just found that out srry
@Rovsau Жыл бұрын
@@buzatusebastian2735 ah lol, I missed that myself xD
@sapientunderground3 жыл бұрын
Cheers, no more correcting new scripts before I can start working with them!
@chaostellar2 жыл бұрын
Thank you for the amazing tutorials
@Tarodev2 жыл бұрын
You're like text mesh pro, but backwards!
@GameDevNerd2 жыл бұрын
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.
@PitiITNet2 жыл бұрын
Such a small thing but making life so much better :D. Love it!
@Shonia3 жыл бұрын
You can also have multiple templates of that and choose which you want.
@guyginat3 жыл бұрын
How do you do that?
@Tarodev3 жыл бұрын
@@guyginat I'm also interested in how this is done
@Shonia3 жыл бұрын
@@Tarodev Idk if I can post link here so... Search youtuber "Coding With Unity" and the name of video is : Unity3D - Create, Edit and Rearrange Script Templates
@Shonia3 жыл бұрын
@@Tarodev Hope it helps!
@nikobellic74553 жыл бұрын
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.
@IlPandax3 жыл бұрын
Yes but only for a specific project, right?
@nikobellic74553 жыл бұрын
Yes, its not for all project or system wide, so it also may not be ideal in all cases, but its still another way to do it. Pick whichever method is suitable.
@KeyboardKrieger2 жыл бұрын
Even though I use the same templates in all projects, this solution seems to be less hacky and more straight forward.
@joaolira7 Жыл бұрын
Makes more sense doing your way. Every project can have a different namespace, for example.
@joaolira7 Жыл бұрын
@Niko Bellic Does the script must have a specific name?
@guyginat3 жыл бұрын
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!
@mementomori71603 жыл бұрын
In short, by using namespaces you somewhat enforce to write cleaner less tangled code. I thought the exact same thing like you some time ago, but now I'm slowly changing it. There is a channel infallible code or something like this, they covered it nicely
@kingbling75713 жыл бұрын
It acts as a barrier which is always nice when you need to clearly define a line between two different modules n such
@modiddymo3 жыл бұрын
Also in larger projects it shows you which modules a given class depends on by giving you a list of using statements at the top of your file.
@jeffmccloud9053 жыл бұрын
Think of them like folders/sub-folders of your file system. They are for organization and to prevent naming collisions (imagine two classes named Button or Weapon). They become particularly important on large projects or when you make/reference DLLs
@midniteoilsoftware3 жыл бұрын
kzbin.infosearch?query=namespaces
@kubstoff14183 жыл бұрын
pretty cool, tho I usually add a blank class from rider since it has a better project view and shows which assembly is the parent
@Вдм3 жыл бұрын
For me it was empty folders in c:\Program Files\Unity, but found it in my home folder c:\Users\USERNAME\Unity\VERSION\Editor\Data\Resources\ScriptTemplates\
@umapessoa60513 жыл бұрын
You can also do this without changing the editor default templates by putting it on a special folder inside yout assets folder, this way everyone that works on the project will have it too
@jamesfoward77613 жыл бұрын
You can also set the Namepsace via the Edit > Project Settings> Editor > ROOT NAMESPACE
@Tarodev3 жыл бұрын
Sure do wish I knew this before I did this video :)
@jamesfoward77613 жыл бұрын
@@Tarodev ^_^ the video is great, I had no idea you could remove those pesky empty Monobehaviors calls/libraries
@kingbling75713 жыл бұрын
@@jamesfoward7761 does it include the namespace in every new Script u create?
@jamesfoward77613 жыл бұрын
@@kingbling7571 Yes sir
@nguyeninhtai52443 жыл бұрын
I can't generate namespace by your way in UnityEdior2019
@PixelbugStudio3 жыл бұрын
That was really cool✌️
@rafarodriguez47653 жыл бұрын
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
@BlackoutGamingChannel3 жыл бұрын
Can you do one of these on namespaces please? I kindda understand them but also i have no real idea what/why/when/where/how. Also, thank you.
@-.._.-_...-_.._-..__..._.-.-.-2 жыл бұрын
Why did they choose to store the templates in the version folder? This means your templates are lost when you update Unity, which is pretty much every time you start a new project. Why couldn't they store the templates in the AppData folder, along with all the other presets (such as keybinds and layouts)?
@IlPandax3 жыл бұрын
That's great! I didn't know that. ;)
@YasserSedrati3 жыл бұрын
AMAZING!
@EnemyOTS Жыл бұрын
thank you for the tip. Now my Unity is creating a new testscript instead and i dont know how to undo the damage.
@epicmcdude2 жыл бұрын
Hey Tarodev, Would you be able to make a tutorial about a combat or text log? Like in those CRPGS (Fallout 2, Baldurs Gate) where you have a small window to the side with a bunch of scrolling text telling you what you hit and for how much damage, or telling you information about an object you clicked on. Thanks for the videos!
@Tarodev2 жыл бұрын
Great suggestion!
@omritahar90482 жыл бұрын
So i'm saving it and trying to replace the original but it says access to the path is denied. Care to help?
@midniteoilsoftware2 жыл бұрын
This is great for when creating new scripts. But is there a template I can change so it doesn't put the annoying private keyword when adding new methods (e.g. Awake, OnEnable, etc.)?
@KeyboardKrieger3 жыл бұрын
Nice one, I will do that at first on Monday xD
@KeyboardKrieger2 жыл бұрын
Maybe it was today and not the following monday, but hey at least it's a monday and I finally used this tip^^
@SkorpionYassine2 жыл бұрын
@@KeyboardKrieger lmaoo
@littleknight662 жыл бұрын
how can i learn a littble bit more about script template ?
@crummymudd8625 Жыл бұрын
Thank you -- I've been wondering how to change this for a long time. I'm on Linux, so the path was a little different.
@thesilentwisp3 жыл бұрын
Haha thank you. Cool beansss
@TriCombStudio3 жыл бұрын
Any clue why Time.deltaTime would not work in my script? It says 'float' does not contain a definition for 'deltaTime' and no accessible extension method 'deltaTime' accepting a first argument type 'float' could be found. Restarted VS and unity, regenerated project files and tried the unity debugger without success. I am stumped... It still works in other scripts. fixedDeltaTime also would produce a similar error if I try to implement it under the fixedUpdate.
@MaZyYTube2 жыл бұрын
You are in wrong place
@TriCombStudio2 жыл бұрын
@@MaZyYTube this comment especially proves that with how abundantly helpful it is. My issue was resolved thanks to posting in comments sections though... so high five to people who comment regardless of how ignorant their opinions are for getting the ball rolling!
@MaZyYTube2 жыл бұрын
@@TriCombStudio its good for you but imagine this video would have full of off-topic comments like this help request / questions it wouldn't make fun to read anymore.. and some bigger ytber already have this and needed to start deleting comments. Do you want it same here? I mean I would understand if this were related to the video. 2. It is harder to help in yt comment section. Better to use unity forum, reddit or discord. It is easier to share code and to analyse it.
@TriCombStudio2 жыл бұрын
@@MaZyYTube This reply was far more useful than your first comment, I probably could have actually used this advice
@ErtBaran2 жыл бұрын
Great 💯 Thanks.
@iDigvijaysinhG3 жыл бұрын
Am I really first 😅, and great video, now I will get rid of those start and update methods
@bambidalc5133 жыл бұрын
What is the font type you use for the notes in the video? Nice tip btw, thx!
@Dorbellprod3 жыл бұрын
I've been growing quite sick of those default comments.
@Tarodev3 жыл бұрын
Now you'll be free of them!
@fleity3 жыл бұрын
it's slightly annoying this has to be done for every (new) install of unity. An interesting addition would be to show how to add custom menu entries to create c# scripts using specific templates
@Tarodev3 жыл бұрын
You mean like what should already be built in to Unity? Man, I've been wanting this for years!
@fleity3 жыл бұрын
@@Tarodev Yes absolutely! :D It actually doesn't sound that complicated. I feel like I could build that... I might just do that
@fleity3 жыл бұрын
@@Tarodev OH WOW! I didn't knew until a few minutes ago but this has been built into Unity all along already. Just duplicate the script template and give it a new valid name: {SortingIndex}-{MenuItemName}-{FileName}.txt restart unity if it's already open
@Cloud-Yo3 жыл бұрын
Now if only there was a way to not have to repeat this operation with each new version of Unity.
@MaZyYTube2 жыл бұрын
Yes annoying but you could write a batch or shell file or even with c# to make little automization
@goldone013 жыл бұрын
It's really useful. The only annoying thing is that you need to repeat it every time you download a new Unity Version
@KeyboardKrieger3 жыл бұрын
If you stay to LTS versions it's only one or two copy & paste a year.
@SolonisRex2 жыл бұрын
Put them in the directory "Assets/ScriptTemplates". Unity looks for this folder and you can do it on a per project basis. This really is the best way to do it.