Get the latest Education e-news
 
  • Top 3 Tips For Starting A New Unity Project

    [07.03.18]
    - Charles Hinshaw

    #3: Don't Let Broken Things Build Up

    The little inconveniences and time wasters that you experience each day will build up and suck the joy out of development. My advice is to aggressively remove these things are they are encountered.

    • Keep your console clean and run your project with "Warnings as Errors" - add mcs.rsp and smcs.rsp to your Assets folder with -warnaserror+ in each to force you to actually deal with things. This might initially slow down your development as you adjust to things like unused variables preventing compilation, but you'll quickly adapt, and the peace of mind is worth it.

    • When iterating in the Editor, keep "Error Pause" toggled in the Console or, better yet, keep a debugger with break on error attached. Don't let runtime errors slide even a little bit.

    • Keep your code clean and use static code analysis as you go to help you get rid of things like redundant using directives or unused parameters.

    • Write tests. You have a new project and the opportunity to go for a lot of test coverage. This is the time to get into that habit.

    • Set up something for Continuous Integration (even when you start and if you are the only developer). A lot of the steps already mentioned in this post are ideal candidates for automating. Additionally, you can do things like look into your scenes to ensure that there aren't missing scripts referenced and to run any custom validation code-these things are best discovered and addressed quickly.

    Conclusion

    When writing this, I tried to prioritize simple things that make a big difference when done early in a project's life. There are, of course, a million other things where I would say "oh, that is super important!", but I don't think any of them would bump these three points right when you start a new project.

    One last thing that I'd like to point out - all of this advice applies even if you are a solo developer working on a hobby project. Just read statements like " you can't hope for other people to understand how things are organized and maintain a project it if you don't understand it yourself" as "you can't hope for future you to understand how things are organized and maintain a project if present you doesn't understand it."

    I hope you enjoyed these tips and found them useful. If you have any other advice to share with someone creating a new project, let me know!

Comments

comments powered by Disqus