Multiplayer Mastery Course - game.courses/mp/ Game Dev Course for Beginners - game.courses/bc/ Join the Group - unity3d.group/ Members Get Early Access to Videos - / @unity3dcollege
Пікірлер: 19
@beardedlinuxgeek8 ай бұрын
Jason, you have been pumping out the content lately. Loving this enthusiasm.
@RobLang8 ай бұрын
Two things jump out - firstly, you should prefix your namespaces with something unique to avoid collisions. i.e. namespace WeimannGames.Characters.Items. If you were to import a package that also used the Characters namespace then you'll spend ages renaming things. Secondly, you can go even further with this theory and move all assets relating to characters under character. In other industries, code and assets are gradually moving toward domain driven design where the boundaries of your code (you call them features) are drawn along the domain you're working in. In game dev, that's dependent on the game but would include things like player, NPC, enemy, world tile, etc. Then when you organise all your assets, you do it down these domain boundaries. The mesh, materials, textures live next to the C#. When you're changing a feature then everything is in one place. Shared items are clearly shown because they exist outside of any domain folder. You can make huge monolith systems like this (which games are) while keeping complexity down because complexity in OO systems is nearly always through dependencies. Keep up the great work!
@KeyboardKrieger8 ай бұрын
Second that
@midniteoilsoftware8 ай бұрын
I took that approach in my Highland Panic project.
@fokeyjo8 ай бұрын
Yeah.. and Jason Storey has a video where he shows there's some default namespace field, and then shows how you can get it to autofill into the C# template. Just to understand what you're saying about breaking it up into domains, is that like every component (or small group of) is their own mini-package? I've been wondering whether that's a feasible approach, because it's technically how you use 3rd party assets.
@captainufo45878 ай бұрын
In my experience, you need to smash your face against an obstacle to learn why certain practices are good. I don't mean this in a punishing way, I mean you just won't store in permanent memory a concept unless you experience the need for it. Structure, namespaces and folder organization is one of those. I designed my first game by the seat of my pants and it was a fun and learning experience I'd actually recommend, if one has the resolution to see it through. Once I found myself with 50 scripts under the same namespace all in the same folder, I saw the use for design documents, namespaces, and folder trees, and assemblies. And surprisingly, since I was invested in the project, refactoring the whole thing to be more sane and mantainable was fun and satisfying rather than daunting.
@stas_khavruk8 ай бұрын
I'm experiencing difficulties with organizing plugins from the Asset Store. Typically, I create a "project" folder (Unity Sources => Project), allowing the plugins' files to install automatically in the top-tier folder. However, I need to create an assembly definition file specifying the assembly contents, including the plugins, to enable IDE autocomplete/IntelliSense and to ensure the project is buildable. How did you address this issue for the "plugins" folder? Did you manually move all downloaded assets and define them in a configuration file, or is there a simpler method?
@alexandernava92758 ай бұрын
You should look into assembly definitions. They help with compile time, and can help auto do namespaces.
@nixonscherbarth19748 ай бұрын
Hey Jason, Is there any way to still do your multiplayer mastery course? I think this would be a perfect chance to create an Udemy course for example! I think you’re the best Unity „teacher“ out there, but as a student I couldn’t afford 1000 bucks for that course :/
@puretrack068 ай бұрын
Go in depth and add assembly definitions
@SMxYuu8 ай бұрын
Hi Jason, can you talk about how should i structure the Assembly definitions, since it can't cross referencing like Namespace. E.g. what if my Character and Level need to reference each other. What would you do for the Assembly definitions.
@jefflynch8 ай бұрын
You can actually cross reference assemblies in an assembly definition. There's a section in the assembly definition for assembly definition references. The CSharp assembly is included by default, but you can add references to other assemblies. The one caveat is that you can't have cyclical references, so you can have both Character reference Level and Level reference Character. It needs to be a one-way dependency. There are also assembly definition reference assets, which is just an asset you place in a folder that allows all of the scripts in that folder to be refenced by an assembly as if they were part of an assembly, but without the formal requirements of an assembly (i e. scripts in that folder can still reference other scripts in assemblies like any other script you write in your project).
@jamesclark26638 ай бұрын
My suggestion would be the reconsider your design. Cyclical references like that should be avoided. Consider if it *really* is neccessary that your characters and level need to know about it each other at all and if so, why shouldn't it be a one-way reference. One of the really great things about asmdefs is that they immediately expose these sorts of problems and force you to fix them. Don't fight it. Embrace it.
@josephstar78968 ай бұрын
Hey jason i have a questiom! If something, some system is goıing to change completely, which approach do you take? Replace all the files of the old system or create new files? I find it hard to manage if old files keep piling up but don't want to delete them all either
@ExpensivePizza8 ай бұрын
One of the most annoying things about Unity is how it puts everything in the root Assets folder when you import stuff from the asset store. I know some people like to move things into a Plugins folder but recently I've been trying a different approach... Basically I put all my code and assets in a folder called _Game. That way I don't need to bother moving stuff around after importing it from the store and all my stuff appears at the top of the folder structure.
@manzell8 ай бұрын
I'm enjoying these short videos. I use namespaces but I don't totally understand the purpose of "sub namespaces" - the MSFT C# documentation advises against using the same class names in different namespaces, so you're not really resolving potential conflicts with subspaces.
@Ts1nd8 ай бұрын
Can you make a video showing how did you set up your VS Code? Any tips and tricks etc.