Question regarding working with Needle Engine + Unity and a Git Repo

hi, i’m currently working on a small project with a friend.
we are using needle engine for this. we have set up a git repo to work together.
unfortunately we don’t have too much experience with working in unity. which files from our project folder should we upload to the repo and which not?
a needle engine project folder in unity is relatively large and kinda awkward to handle in a gitrepo.
it would be sufficient if we upload exactly the files that are needed to get from a needle engine standard installation to our state of affairs. how could this be achieved? are there perhaps even better methods?

Original Post on Discord

by user 313407509618622466

Hello there – we have an experimental AI bot :robot: that might be able to help you with your question. Would you like to try this out?

How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.

Help requested: please wait a moment…

Here is what I found for you :brain: Discord

To set up a Needle Engine project for collaboration using Git, you should include the essential files that make up your project’s state but exclude temporary or non-essential files that can be generated by each user’s environment. Here’s a guideline for what to include and exclude:

Include:

  • Assets/ folder: Contains your project’s specific assets like scenes, models, scripts, etc.
  • Packages/ folder: Contains packages installed specifically for your project.
  • ProjectSettings/ folder: Contains Unity-specific project settings.
  • needle.config.json: Configuration for Needle Engine builds and integrations.
  • package.json: Project configuration with dependencies and scripts.
  • tsconfig.json: Typescript compiler configuration.
  • .gitignore: Customize this to exclude files/folders from git.
  • Other custom folders and configurations relevant to your project.

Exclude:

  • Library/: Contains local cache for your Unity project and can be regenerated.
  • Temp/: Contains temporary build files.
  • obj/: Contains temporary object files.
  • Build/: Contains build output which can be large and should be generated by each user.
  • Logs/: Contains Unity log files.
  • .vs/, .vscode/: Contains settings for Visual Studio and VSCode specific to your local setup.
  • Other user-specific files such as user preferences or editor backups.

A comprehensive .gitignore provided by GitHub for Unity projects can help automate the exclusion of files that shouldn’t be tracked: Unity.gitignore.

Additionally, utilize Git Large File Storage (LFS) for tracking large assets like textures, models, audio files, etc., as this will keep your repository size manageable and cloning faster.

thread_4Yu92jiaRh8yd4J4Y1rAf1xU

Regular Unity gitignore files will work for this, e.g. you can add this to your .gitignore (given your project is in a subdirectory):

*/Library
*/Temp
*/UserSettings
*/Logs
*/obj
*/*.sln
*/*.csproj

i’ll check it out. thanks for the quick response

by user 313407509618622466