3
\$\begingroup\$

I would like to keep my Git repository as small as possible and exclude any automatically generated files. The developers can re-build their Unity Addressable Assets themselves. Any developer should be able to build the final project and the final result should contain the same assets packed in the same way.

I noticed that Unity generates the following files and folders:

enter image description here

Which of these files are important settings that should be included and which files are safe to exclude from a Git repository?

\$\endgroup\$
2
  • \$\begingroup\$ I think this should contain great advices: thoughtbot.com/blog/how-to-git-with-unity \$\endgroup\$
    – Andrea
    Feb 14, 2020 at 14:00
  • \$\begingroup\$ @Andrea Thanks, but that article was written in 2017 before Addressables existed. \$\endgroup\$ Feb 14, 2020 at 18:42

1 Answer 1

2
\$\begingroup\$

It broke when I removed any of these:

/AddressableAssetsData/AssetGroups
/AddressableAssetsData/DataBuilders

Nothing broke (no obvious errors) when I removed

/AddressableAssetsData/AssetGroups/Schemas
/AddressableAssetsData/AssetGroupTemplates

... but when I build the application, the Addressables were missing and after further investigation I noticed that each Group's Content Packing & Loading "Component" (actually "Schema") was obviously missing so I assume Unity just silently ignored the packing of my assets. And without the AssetGroupTemplates, my AddressableAssetSettings asset showed that the Asset Group Templates were missing, so I guess that is also a required folder.

The following addition to the .gitignore will only remove the binaries generated by the Asset packing and keep all the other settings.

/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .