Unity game project structure

Unity game project structure

Explorer

  • .git…
  • .vscodenew
  • extensions.jsonnew
  • settings.jsonnew
  • Assets
  • Pluginsnew
  • TutorialInfo
  • Readme.asset
  • InputSystem_Actions.inputactions
  • Library…, not committed
  • Logs…, not committed
  • Packages
  • manifest.json
  • packages-lock.json
  • ProjectSettings
  • ProjectVersion.txt
  • ProjectSettings.asset
  • EditorSettings.asset
  • EditorBuildSettings.asset
  • TagManager.asset
  • QualitySettings.asset
  • PackageManagerSettings.asset
  • DynamicsManager.assetnew
  • Temp…, not committed
  • UserSettings…, not committed
  • obj…, not committed
  • Assembly-CSharp.csproj, not committed
  • docsnew
  • game-design.mdnew
  • .editorconfignew
  • .gitattributes
  • .gitignore
  • README.md
  1. # Install the editor version the project will use through Unity Hub (or the Hub CLI)

    unityhub -- --headless install --version 6000.3.25f1
  2. # Create the project from the Universal 3D template in Unity Hub, then set up Git with LFS in the project folder

    git init && git lfs install
  3. # Add a Unity .gitignore and .gitattributes before the first commit

    curl -o .gitignore https://raw.githubusercontent.com/github/gitignore/main/Unity.gitignore
  4. # Configure Smart Merge for scenes and prefabs (path depends on your editor install)

    git config merge.unityyamlmerge.driver "'<Editor>/Data/Tools/UnityYAMLMerge' merge -p %O %B %A %A"
  5. # Run all tests from the command line, as CI does

    Unity -batchmode -projectPath . -runTests -testPlatform EditMode -testResults results.xml
  6. # Build a player through your build script

    Unity -batchmode -quit -projectPath . -executeMethod BuildScript.BuildWindows