Tuesday, November 11, 2014

My Basic new Unity Project Setup

I wanted to make a little how-to guide for how I get a new Unity project up and running, mostly as a reference for my future self.

Unity3D Project

  • Open up Unity and create a new project. 
    • Project Location needs to be an empty folder, which is why we create the project first.
    • I generally ignore the starting packages, because I make everything I need on my own.
  • Save the scene as gameplay.unity into the assets folder.
  • Create Resources folder and Scripts folder under Assets.
  • Create Art folder in the root project directory (now know as projectDir) for all of the art project files.
  • Click Assets > Sync Monodevelop Project to create the c-sharp project. 
    • Use the projectname-csharp.sln when opening Visual Studio 2010 Express.

Git

  • "git init" in the projectDir.
  • Add .gitignore to projectDir. This tells git to ignore certain files and folders in the project. It contains the following values, each on a new line.
    • Library
    • Temp
    • obj
    • dump (something I use internally, as a place to store temp art files )

Bitbucket

  • Create a new repo by clicking the create button.
    • Take note of the command line directions to be able to add the remote later.

Initial Commit

  • git add everything and commit.
    • I use TortoiseGit as a nice and quick QUI for all my git needs.
    • The .gitignore file should have removed quite a few files.
    • You should be committing pretty much everything remaining in your projectDir.
  • Push to Bitbucket
    • Bitbucket actually gives you the git commands to add the remove origin and do the first push.
    • I prefer to set up the remote in TortoiseGit.
      • Remote: The name of the remote
      • URL: The url to the repo (https://[user]@bitbucket.org/[user]/[project].git
    • Click "add new/save"


And that's the basics of my setup when I make a new Unity project. Nothing particularly special here, just setting up Unity, C-sharp proj, .gitignore, git, and Bitbucket.