본문 바로가기
Unity/Study

[유니티] 유니티 프로젝트 깃허브 업로드

by 김 원 2024. 8. 22.

# 유니티 프로젝트 깃허브 업로드

- 유니티 프로젝트를 깃허브로 관리하고 있었지만 코드 자체만 올려서 사용하고 있었다. 그러나 디자이너분이 프로젝트 파일이 필요하셔서 리소스 및 전체 데이터까지 올려보려고 했으나 잘 되지 않아 방법을 찾아보았고 아래 방법으로 해결했다.

 

- 1. 유니티 프로젝트 파일 설정 변경

   - Edit - Project Settings에 Version Control - Mode Visible Meta Files로 변경

   - Edit - Project Settings에 Editor -  Asset Serialization - ModeForce Text로 변경

- 2. 깃허브 새로운 리포지토리 생성

- 3. 유니티  Git ignore 파일 추가 -> .meta 파일을 git에 무조건 포함시켜야 한다.

- 4. 만든 리포지토리에 Git ignore 및 프로젝트 파일 전체 커밋 및 푸시

 

# Git ignore 내용

더보기
더보기
더보기
# Created by https://www.toptal.com/developers/gitignore/api/unity
# Edit at https://www.toptal.com/developers/gitignore?templates=unity

### Unity ###
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/main/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/

# Recordings can get excessive in size
/[Rr]ecordings/

# Uncomment this line if you wish 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
*.mdb
*.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
*.app

# 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/*

# End of https://www.toptal.com/developers/gitignore/api/unity

- 참고자료 : https://suldangoo.tistory.com/3

- 참고자료 : https://sonbosun.tistory.com/39

'Unity > Study' 카테고리의 다른 글

[유니티] 유니티 프로젝트 파일관리  (0) 2025.01.03