4.4 KiB
Using a version control system
Note
For versions 2019/2020 LTS, download the Visual Scripting package from the Unity Asset Store.
To avoid any problems with automatically generated files, you should exclude some Visual Scripting files from version control.
Excluding Visual Scripting package files from version control
To exclude files from your version control solution, the standard approach is to include a file that specifies which files and folders to exclude:
-
Create a new file at the root of your project folder. This is at the level above your Assets folder.
-
Name the file according to your chosen version control system:
-
Git:
.gitignore. For more information, see Git's documentation on gitignore. -
Unity Collab:
.collabignore. For more information, see the Unity User Manual. -
Subversion: Ignore the files from your
svn:ignoreproperty or runtime configuration options. For more information, see Subversion's documentation on Ignoring Unversioned Items.
-
-
Add the appropriate files or file patterns to your ignore file or configuration. For an example and more information, see Ignore file template.
Note
If you have an issue creating a
.gitignorefile on Windows, refer to Microsoft's documentation on creating a .gitignore file from the command line.
Ignore file template
The following template ignores all core Visual Scripting files, but preserves your project settings and variables. It also includes the standard Unity ignore directives for files that you shouldn't add to version control. For more information, see the Unity.gitignore file included in GitHub's gitignore template repository.
Refer to the comments in the template for which lines you can comment or remove, depending on your needs.
# Optionally exclude these transient (generated) files,
# because they can be easily re-generated by the package
Assets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db
Assets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db.meta
Assets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers
Assets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers.meta
## Unity
# From: https://github.com/github/gitignore/blob/master/Unity.gitignore
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you want to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
# Unity3D Generated File On Crash Reports
sysinfo.txt
# Builds
*.apk
*.aab
*.unitypackage
# Crashlytics generated file
crashlytics-build.properties
# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*.*.bin*
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
Removing previously committed files
If you committed any files to your version control solution that should be excluded:
- See Git's documentation on the
git-rmcommand. - See Subversion's documentation on the
svn deletecommand.