Organize your files in version control

    How you organize and share your files is up to you, but there are some things to keep in mind.

    We don't recommend you add the Bin or obj folders to version control. This is because:

    • Game Studio builds these folders every time you run the game, so you don't need to keep a history of them.
    • You can't see if they match the source files they were generated from in a given commit.

    We don't recommend you save resource files in the Assets folder. You might be used to organizing files this way if you use Unity®, as Unity® requires resource files and asset files to be in the same folder. Xenko doesn't require this, and doing so has downsides.

    For example, imagine an artist has edited 10GB of textures and committed them to source control. At the same time, a designer needs to edit an asset quickly. To do this, the designer gets the latest version of the asset from source control. However, because the assets and resource files are in the same folder, the designer is forced to get the 10gb of files at the same time. If the files are in a separate folder, however, the designer only has to get the folder they need. Additionally, as asset files are much smaller than resource files, it's much faster to navigate the asset history in a dedicated asset folder.

    We don't recommend you save content creation files in your project folder. This is because the files are often large and aren't used in the project directly. Instead, we recommend you save the files in a different version control repository - or, if your version control system supports partial checkouts (such as SVN or Perforce), a different root folder. This means team members only get the files they need.

    Following these suggestions, an example folder structure might look like this:

    1. - MyGame
    2. - texture.xktex
    3. - model.xktex
    4. - Bin
    5. - MyGame.Game
    6. - MyGame.Platform
    7. - obj
    8. - Resources
    9. - model.fbx
    10. - PhotoshopProjects
    11. - texture.psd
    12. - MayaProjects
    13. - model.mb

    Imagine a team with two programmers, two 2D artists, and two 3D artists.

    • The programmers check out the MyGame project folder containing code, assets, and resources.
    • The 2D artists check out the game project and the PhotoshopProjects folder containing .psd files.
    • The 3D artists check out the game project and the MayaProjects folder containing .mb (Maya project) files.Now imagine one of the 2D artists changes several files and commits 2GB of changes to version control. Because only the 2D artists have the PhotoshopProjects folder checked out, only the other 2D artist gets this change. The other team members don't need it. This is an efficient way to share files across projects.