Most assets in Unity are combined into the project when it is built.
There are lots of ways to do this, and we will give some examples of things we have seen work well. If you are passing this numbers, you are probably creating a god class and we really want to avoid that.įolder structure helps your teammates to modify/search/ organize project and resources in parallel development. And the main classes less than 1000 lines. A small class should have less than 100 lines.
Try to keep it short & simple: Take a small piece of your code and think: “How a kick-ass solution for that should look like?”. Try to keep your classes with few lines. It makes it easier to keep track of data across levels.Ĥ.It makes loading much faster (if most objects are shared between scenes).It makes it unnecessary to re-setup each scene.Consider saving levels in XML instead of in scenes: This is especially useful to catch missing assets.ģ. No-one should make any changes to their clean copies. After changes, this second copy, the clean copy, should be updated and tested. Each team member should have a second copy of the project checked out for testing: if you are using version control. The “wrong” branch should have a funky name, for example, use a double underscore prefix: _MainScene_Backup.Ģ. If you absolutely have to branch a prefab, scene, or mesh, follow a process that makes it very clear which is the right version. Avoid branching assets: There should always only ever be one version of any asset. These are a set of best practices we’ve found from our own experience and a number of other sites.ġ. Here’s the trick, if you don’t maintain it earlier and keep it organized, you’ll have a hard time later on and will find yourself wasting time organizing the mess rather than focusing on features.
When software gets bigger, it becomes difficult to maintain that’s a fact. But the most compelling reason this lazy programmer has to design early is that if the prototype is already built with a good system design it’s super easy to just roll that on into a production project.
Building multiple projects on a similar well-designed foundation also makes it easier to swap between projects. You might be wondering why you need to think about good structure at the very beginning of a project? Well for starters its good discipline, the more you do it the more natural it becomes and it will eventually save you time. Plan Structure From the Very Beginning of Your Project
Jin Unit圓D Programming tagged AR/VR / ARProjects / SourceControl / unit圓d / UnityBestPractices / UnityFolderStructure / UnityProject / VersionControl by Sanket Prabhu