You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
[](https://discord.gg/5zH8hVx)
10
-
[](https://www.twitch.tv/sh4na)
11
-
12
10
13
11
## Notices
14
12
15
13
Please refer to the [list of known issues](https://github.com/github-for-unity/Unity/issues?q=is%3Aissue+is%3Aopen+label%3Abug), and make sure you have backups of your work before trying it out.
16
14
17
15
From version 0.19 onwards, the location of the plugin has moved to `Assets/Plugins/GitHub`. If you have version 0.18 or lower, you need to delete the `Assets/Editor/GitHub` folder before you install newer versions. You should exit Unity and delete the folder from Explorer/Finder, as Unity will not unload native libraries while it's running. Also, remember to update your `.gitignore` file.
18
16
19
-
#### Table Of Contents
20
-
21
-
[Installing GitHub for Unity](#installing-github-for-unity)
22
-
*[Requirements](#requirements)
23
-
*[Git on macOS](#git-on-macos)
24
-
*[Git on Windows](#git-on-windows)
25
-
*[Installation](#installation)
26
-
*[Log files](#log-files)
27
-
*[Windows](#windows)
28
-
*[macOS](#macos)
29
-
30
-
[Building and Contributing](#building-and-contributing)
31
-
32
-
[Quick Guide to GitHub for Unity](#quick-guide-to-github-for-unity)
33
-
*[Opening the GitHub window](#opening-the-github-window)
34
-
*[Initialize Repository](#initialize-repository)
35
-
*[Authentication](#authentication)
36
-
*[Publish a new repository](#publish-a-new-repository)
37
-
*[Commiting your work - Changes tab](#commiting-your-work---changes-tab)
38
-
*[Pushing/pulling your work - History tab](#pushingpulling-your-work---history-tab)
39
-
*[Branches tab](#branches-tab)
40
-
*[Settings tab](#settings-tab)
41
-
42
-
[More Resources](#more-resources)
43
-
44
-
[License](#license)
45
-
46
-
## Installing GitHub for Unity
47
-
48
-
### Requirements
49
-
50
-
- Unity 5.4 or higher
51
-
- There's currently an blocker issue opened for 5.3 support, so we know it doesn't run there. Personal edition is fine.
52
-
- Git and Git LFS 2.x
53
-
54
-
#### Git on macOS
55
-
56
-
The current release has limited macOS support. macOS users will need to install the latest [Git](https://git-scm.com/downloads) and [Git LFS](https://git-lfs.github.com/) manually, and make sure these are on the path. You can configure the Git location in the Settings tab on the GitHub window.
57
-
58
-
The easiest way of installing git and git lfs is to install [Homebrew](https://brew.sh/) and then do `brew install git git-lfs`.
59
-
60
-
Make sure a Git user and email address are set in the `~/.gitconfig` file before you initialize a repository for the first time. You can set these values by opening your `~/.gitconfig` file and adding the following section, if it doesn't exist yet:
61
-
62
-
```
63
-
[user]
64
-
name = Your Name
65
-
email = Your Email
66
-
```
67
-
68
-
#### Git on Windows
69
-
70
-
The GitHub for Unity extension ships with a bundle of Git and Git LFS, to ensure that you have the correct version. These will be installed into `%LOCALAPPDATA%\GitHubUnity` when the extension runs for the first time.
71
-
72
-
Make sure a Git user and email address are set in the `%HOME%\.gitconfig` file before you initialize a repository for the first time. You can set these values by opening your `%HOME%\.gitconfig` file and adding the following section, if it doesn't exist yet:
73
-
74
-
```
75
-
[user]
76
-
name = Your Name
77
-
email = Your Email
78
-
```
79
-
80
-
Once the extension is installed, you can open a command line with the same Git and Git LFS version that the extension uses by going to `Window` -> `GitHub Command Line` in Unity.
81
-
82
-
### Installation
83
-
84
-
This extensions needs to be installed (and updated) for each Unity project that you want to version control.
85
-
First step is to download the latest package from [the releases page](https://github.com/github-for-unity/Unity/releases);
86
-
it will be saved as a file with the extension `.unitypackage`.
87
-
To install it, open Unity, then open the project you want to version control, and then double click on the downloaded package.
88
-
Alternatively, import the package by clicking Assets, Import Package, Custom Package, then select the downloaded package.
89
-
90
-
#### Log files
91
-
92
-
##### macOS
93
-
94
-
The extension log file can be found at `~/Library/Logs/GitHubUnity/github-unity.log`
95
-
96
-
##### Windows
97
-
98
-
The extension log file can be found at `%LOCALAPPDATA%\GitHubUnity\github-unity.log`
99
-
100
17
## Building and Contributing
101
18
102
-
The [CONTRIBUTING.md](CONTRIBUTING.md) document will help you get setup and familiar with the source. The [documentation](docs/) folder also contains more resources relevant to the project.
103
-
104
19
Please read the [How to Build](docs/contributing/how-to-build.md) document for information on how to build GitHub for Unity.
105
20
106
-
If you're looking for something to work on, check out the [up-for-grabs](https://github.com/github-for-unity/Unity/issues?q=is%3Aopen+is%3Aissue+label%3Aup-for-grabs) label.
107
-
108
-
109
-
## I have a problem with GitHub for Unity
110
-
111
-
First, please search the [open issues](https://github.com/github-for-unity/Unity/issues?q=is%3Aopen)
112
-
and [closed issues](https://github.com/github-for-unity/Unity/issues?q=is%3Aclosed)
113
-
to see if your issue hasn't already been reported (it may also be fixed).
114
-
115
-
If you can't find an issue that matches what you're seeing, open a [new issue](https://github.com/github-for-unity/Unity/issues/new)
116
-
and fill out the template to provide us with enough information to investigate
117
-
further.
118
-
119
-
## Quick Guide to GitHub for Unity
120
-
121
-
### Opening the GitHub window
122
-
123
-
You can access the GitHub window by going to Windows -> GitHub. The window opens by default next to the Inspector window.
If the current Unity project is not in a Git repository, the GitHub for Unity extension will offer to initialize the repository for you. This will:
130
-
131
-
- Initialize a git repository at the Unity project root via `git init`
132
-
- Initialize git-lfs via `git lfs install`
133
-
- Set up a `.gitignore` file at the Unity project root.
134
-
- Set up a `.gitattributes` file at the Unity project root with a large list of known binary filetypes (images, audio, etc) that should be tracked by LFS
135
-
- Configure the project to serialize meta files as text
136
-
- Create an initial commit with the `.gitignore` and `.gitattributes` file.
137
-
138
-
### Authentication
139
-
140
-
To set up credentials in Git so you can push and pull, you can sign in to GitHub by going to `Window` -> `GitHub` -> `Account` -> `Sign in`. You only have to sign in successfully once, your credentials will remain on the system for all Git operations in Unity and outside of it. If you've already signed in once but the Account dropdown still says `Sign in`, ignore it, it's a bug.
1. Go to [github.com](https://github.com) and create a new empty repository - do not add a license, readme or other files during the creation process.
147
-
2. Copy the **https** URL shown in the creation page
148
-
3. In Unity, go to `Windows` -> `GitHub` -> `Settings` and paste the url into the `Remote` textbox.
149
-
3. Click `Save repository`.
150
-
4. Go to the `History` tab and click `Push`.
151
-
152
-
### Commiting your work - Changes tab
153
-
154
-
You can see which files have been changed and commit them through the Changes tab. `.meta` files will show up in relation to their files on the tree, so you can select a file for comitting and automatically have their `.meta`
The history tab includes a `Push` button to push your work to the server. Make sure you have a remote url configured in the `Settings` tab so that you can push and pull your work.
161
-
162
-
To receive updates from the server by clicking on the `Pull` button. You cannot pull if you have local changes, so commit your changes before pulling.
The [CONTRIBUTING.md](CONTRIBUTING.md) document will help you get setup and familiar with the source. The [documentation](docs/) folder also contains more resources relevant to the project.
169
22
170
-
### Settings tab
23
+
If you're looking for something to work on, check out the [up-for-grabs](https://github.com/github-for-unity/Unity/issues?q=is%3Aopen+is%3Aissue+label%3Aup-for-grabs) label.
171
24
172
-
You can configure your user data in the Settings tab, along with the path to the Git installation.
25
+
## How to use
173
26
174
-
Locked files will appear in a list in the Settings tab. You can see who has locked a file and release file locks after you've pushed your work.
27
+
The [quick guide to GitHub for Unity](docs/using/quick-guide.md)
Copy file name to clipboardExpand all lines: docs/contributing/how-to-build.md
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ This repository is LFS-enabled. To clone it, you should use a git client that su
13
13
14
14
### MacOS
15
15
16
-
- Mono 4.x required.
16
+
- Mono 4.x required. You can install it via brew with `brew tap shana/mono && brew install mono@4.8`
17
17
- Mono 5.x will not work
18
18
-`UnityEngine.dll` and `UnityEditor.dll`.
19
19
- If you've installed Unity in the default location of `/Applications/Unity`, the build will be able to reference these DLLs automatically. Otherwise, you'll need to copy these DLLs from `[Unity installation path]/Unity.app/Contents/Managed` into the `lib` directory in order for the build to work
@@ -35,12 +35,25 @@ git submodule deinit script
35
35
36
36
### Important pre-build steps
37
37
38
-
To be able to authenticate in GitHub for Unity, you'll need to:
38
+
The build needs to reference `UnityEngine.dll` and `UnityEditor.dll`. These DLLs are included with Unity. If you've installed Unity in the default location, the build will be able to find them automatically. If not, copy these DLLs from `[your Unity installation path]\Unity\Editor\Data\Managed` into the `lib` directory in order for the build to work.
39
+
40
+
#### Developer OAuth app
41
+
42
+
Because GitHub for Unity uses OAuth web application flow to interact with the GitHub API and perform actions on behalf of a user, it needs to be bundled with a Client ID and Secret.
43
+
44
+
For external contributors, we have bundled a developer OAuth application in the source so that you can complete the sign in flow locally without needing to configure your own application.
45
+
46
+
These are listed in `src/GitHub.Api/Application/ApplicationInfo.cs`
47
+
48
+
DO NOT TRUST THIS CLIENT ID AND SECRET! THIS IS ONLY FOR TESTING PURPOSES!!
49
+
50
+
The limitation with this developer application is that this will not work with GitHub Enterprise. You will see sign-in will fail on the OAuth callback due to the credentials not being present there.
51
+
52
+
To provide your own Client ID and Client Secret:
39
53
40
54
-[Register a new developer application](https://github.com/settings/developers) in your profile.
41
55
- Copy [common/ApplicationInfo_Local.cs-example](../../common/ApplicationInfo_Local.cs-example) to `common/ApplicationInfo_Local.cs` and fill out the clientId/clientSecret fields for your application.
42
56
43
-
The build needs to reference `UnityEngine.dll` and `UnityEditor.dll`. These DLLs are included with Unity. If you've installed Unity in the default location, the build will be able to find them automatically. If not, copy these DLLs from `[your Unity installation path]\Unity\Editor\Data\Managed` into the `lib` directory in order for the build to work.
44
57
45
58
### Visual Studio
46
59
@@ -56,13 +69,12 @@ Once you've built the solution for the first time, you can open `src/UnityExtens
56
69
57
70
The build also creates a Unity test project called `GitHubExtension` inside a directory called `github-unity-test` next to your local clone. For instance, if the repository is located at `c:\Projects\Unity` the test project will be at `c:\Projects\github-unity-test\GitHubExtension`. You can use this project to test binary builds of the extension in a clean environment (all needed DLLs will be copied to it every time you build).
58
71
59
-
Note: some files might be locked by Unity if have one of the build output projects open when you compile from VS or the command line. This is expected and shouldn't cause issues with your builds.
72
+
Note: some files might be locked by Unity if have one of the build output projects open when you compile from VS or the command line. This is expected and shouldn't cause issues with your builds.
60
73
61
74
## Solution organization
62
75
63
76
The `GitHub.Unity.sln` solution includes several projects:
64
77
65
-
- dotnet-httpclient35 and octokit: external dependencies for threading and github api support, respectively. These are the submodules.
66
78
- packaging: empty projects with build rules that copy DLLs to various locations for testing
Copy file name to clipboardExpand all lines: docs/readme.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ Details about how the team is organizing and shipping GitHub for Unity:
30
30
31
31
## Using
32
32
33
+
[Quick Guide](using/quick-guide.md)
34
+
33
35
These documents contain more details on how to use the GitHub for Unity plugin:
34
-
-**[Installing and Updating the GitHub for Unity package](https://github.com/github-for-unity/Unity/blob/master/docs/using/how-to-install-and-update.md)**
35
-
-**[Getting Started with the GitHub for Unity package](https://github.com/github-for-unity/Unity/blob/master/docs/using/getting-started.md)**
36
+
-**[Installing and Updating the GitHub for Unity package](using/how-to-install-and-update.md)**
37
+
-**[Getting Started with the GitHub for Unity package](using/getting-started.md)**
0 commit comments