Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 91d7618

Browse files
authored
Merge branch 'master' into fixes/readonlycollection-collision
2 parents 6cfb01e + 9eff271 commit 91d7618

File tree

5 files changed

+131
-78
lines changed

5 files changed

+131
-78
lines changed

Diff for: CONTRIBUTING.md

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ change over time as we learn and refine how we work with the community.
1717
* [The Roadmap](#the-roadmap)
1818

1919
[How Can I Contribute?](#how-can-i-contribute)
20+
* [How to Build](#how-to-build)
2021
* [Reporting Bugs](#reporting-bugs)
2122
* [Suggesting Enhancements](#suggesting-enhancements)
2223
* [Up for Grabs](#up-for-grabs)
@@ -45,6 +46,12 @@ section below to understand how to contribute your feedback.
4546

4647
## How Can I Contribute?
4748

49+
### How to Build
50+
51+
This repository is LFS-enabled. To clone it, you should use a git client that supports git LFS 2.x and submodules.
52+
53+
Please read the [How to Build](https://raw.githubusercontent.com/github-for-unity/Unity/master/docs/contributing/how-to-build.md) document for information on how to build GitHub for Unity.
54+
4855
### Reporting Bugs
4956

5057
This section guides you through submitting a bug report for GitHub for Unity.

Diff for: README.md

+91-62
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,108 @@
22

33
![Build Status](https://ci.appveyor.com/api/projects/status/github/github-for-unity/Unity?branch=master&svg=true)
44

5-
[![Join the chat at https://gitter.im/github/VisualStudio](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/github-for-unity/Unity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5+
[![Join the chat at https://gitter.im/github-for-unity/Unity](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/github-for-unity/Unity?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6+
[![Join the chat at https://discord.gg/5zH8hVx](https://img.shields.io/badge/discord-join%20chat-7289DA.svg)](https://discord.gg/5zH8hVx)
7+
[![GitHub for Unity live coding on Twitch](https://img.shields.io/badge/twitch-live%20coding-6441A4.svg)](https://www.twitch.tv/sh4na)
8+
69

710
The GitHub for Unity extension brings [Git](https://git-scm.com/) and GitHub into [Unity](https://unity3d.com/), integrating source control into your work with friendly and accessible tools and workflows.
811

912
**Please note:** this software is currently alpha quality. 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.
1013

14+
#### Table Of Contents
15+
16+
[Installing GitHub for Unity](#installing-github-for-unity)
17+
* [Requirements](#requirements)
18+
* [Installation](#installation)
19+
20+
[Building and Contributing](#building-and-contributing)
21+
22+
[Log files and Known issues](#log-files-and-known-issues)
23+
* [Windows](#windows)
24+
* [macOS](#macos)
25+
26+
[Quick Guide to GitHub for Unity](#quick-guide-to-github-for-unity)
27+
* [Opening the GitHub window](#opening-the-github-window)
28+
* [Initialize Repository](#initialize-repository)
29+
* [Authentication](#authentication)
30+
* [Publish a new repository](#publish-a-new-repository)
31+
* [Commiting your work - Changes tab](#commiting-your-work---changes-tab)
32+
* [Pushing/pulling your work - History tab](#pushingpulling-your-work---history-tab)
33+
* [Branches tab](#branches-tab)
34+
* [Settings tab](#settings-tab)
35+
36+
[More Resources](#more-resources)
37+
38+
[License](#license)
39+
1140
## Installing GitHub for Unity
1241

1342
### Requirements
1443

15-
- [Unity 5.4 or higher](https://store.unity.com/download). Personal edition is fine.
44+
- We've only tested the extension so far on Unity 5.4 to 5.6. There's currently an blocker issue opened for 5.3 support, so we know it doesn't run there. There are some issues for 2017.x, so it may or may not run well on that version. Personal edition is fine.
1645

1746
### Installation
1847

1948
To install the extension, download the latest package from [the releases page](https://github.com/github-for-unity/Unity/releases) and double click on it.
2049

21-
#### Opening the GitHub window
50+
## Building and Contributing
51+
52+
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.
53+
54+
Please read the [How to Build](docs/contributing/how-to-build.md) document for sinformation on how to build GitHub for Unity.
55+
56+
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.
57+
58+
## Log files and Known issues
59+
60+
### Windows
61+
62+
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%\GitHubUnityDebug` when the extension runs for the first time.
63+
64+
You can open a command line with the same Git and Git LFS version that the extension uses by going to the GitHub -> Command line menu.
65+
66+
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:
67+
68+
```
69+
[user]
70+
name = Your Name
71+
email = Your Email
72+
```
73+
74+
The extension log file can be found at `%LOCALAPPDATA%\GitHubUnityDebug\github-unity.log`
75+
76+
#### macOS
77+
78+
The extension log file can be found at `~/.local/share/GitHubUnityDebug/github-unity.log`. This is a temporary location and will be changed in the future.
79+
80+
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.
81+
82+
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:
83+
84+
```
85+
[user]
86+
name = Your Name
87+
email = Your Email
88+
```
89+
90+
## I have a problem with GitHub for Unity
91+
92+
First, please search the [open issues](https://github.com/github-for-unity/Unity/issues?q=is%3Aopen)
93+
and [closed issues](https://github.com/github-for-unity/Unity/issues?q=is%3Aclosed)
94+
to see if your issue hasn't already been reported (it may also be fixed).
95+
96+
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)
97+
and fill out the template to provide us with enough information to investigate
98+
further.
99+
100+
## Quick Guide to GitHub for Unity
101+
102+
### Opening the GitHub window
22103

23104
You can access the GitHub window by going to Windows -> GitHub. The window opens by default next to the Inspector window.
24105

25-
#### Initialize Repository
106+
### Initialize Repository
26107

27108
![Initialize repository screenshot](https://user-images.githubusercontent.com/121322/27644875-7fc6302a-5bd9-11e7-98d0-c09b2e450503.png)
28109

@@ -35,98 +116,46 @@ If the current Unity project is not in a Git repository, the GitHub for Unity ex
35116
- Configure the project to serialize meta files as text
36117
- Create an initial commit with the `.gitignore` and `.gitattributes` file.
37118

38-
#### Authentication
119+
### Authentication
39120

40121
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.
41122

42123
![Authentication screenshot](https://user-images.githubusercontent.com/121322/27644895-8f22f904-5bd9-11e7-8a93-e6bfe0c24a74.png)
43124

44-
#### Publish a new repository
125+
### Publish a new repository
45126

46127
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.
47128
2. Copy the **https** URL shown in the creation page
48129
3. In Unity, go to `Windows` -> `GitHub` -> `Settings` and paste the url into the `Remote` textbox.
49130
3. Click `Save repository`.
50131
4. Go to the `History` tab and click `Push`.
51132

52-
#### Commiting your work - Changes tab
133+
### Commiting your work - Changes tab
53134

54135
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`
55136

56137
![Changes tab screenshot](https://user-images.githubusercontent.com/121322/27644933-ab00af72-5bd9-11e7-84c3-edec495f87f5.png)
57138

58-
#### Pushing/pulling your work - History tab
139+
### Pushing/pulling your work - History tab
59140

60141
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.
61142

62143
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.
63144

64145
![History tab screenshot](https://user-images.githubusercontent.com/121322/27644965-c1109bba-5bd9-11e7-9257-4fa38f5c67d1.png)
65146

66-
#### Branches tab
147+
### Branches tab
67148

68149
![Branches tab screenshot](https://user-images.githubusercontent.com/121322/27644978-cd3c5622-5bd9-11e7-9dcb-6ae5d5c7dc8a.png)
69150

70-
#### Settings tab
151+
### Settings tab
71152

72153
You can configure your user data in the Settings tab, along with the path to the Git installation.
73154

74155
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.
75156

76157
![Settings tab screenshot](https://user-images.githubusercontent.com/121322/27644993-d9d325a0-5bd9-11e7-86f5-beee00e9e8b8.png)
77158

78-
#### Windows
79-
80-
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%\GitHubUnityDebug` when the extension runs for the first time.
81-
82-
You can open a command line with the same Git and Git LFS version that the extension uses by going to the GitHub -> Command line menu.
83-
84-
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:
85-
86-
```
87-
[user]
88-
name = Your Name
89-
email = Your Email
90-
```
91-
92-
##### Log files
93-
94-
The extension log file can be found at `%LOCALAPPDATA%\GitHubUnityDebug\github-unity.log`
95-
96-
#### macOS
97-
98-
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.
99-
100-
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:
101-
102-
```
103-
[user]
104-
name = Your Name
105-
email = Your Email
106-
```
107-
108-
##### Log files
109-
110-
The extension log file can be found at `~/.local/share/GitHubUnityDebug/github-unity.log`. This is a temporary location and will be changed in the future.
111-
112-
## I have a problem with GitHub for Unity
113-
114-
First, please search the [open issues](https://github.com/github-for-unity/Unity/issues?q=is%3Aopen)
115-
and [closed issues](https://github.com/github-for-unity/Unity/issues?q=is%3Aclosed)
116-
to see if your issue hasn't already been reported (it may also be fixed).
117-
118-
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)
119-
and fill out the template to provide us with enough information to investigate
120-
further.
121-
122-
## How can I contribute to GitHub for Unity?
123-
124-
The [CONTRIBUTING.md](./CONTRIBUTING.md) document will help you get setup and
125-
familiar with the source. The [documentation](docs/) folder also contains more
126-
resources relevant to the project.
127-
128-
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.
129-
130159
## More Resources
131160

132161
See [unity.github.com](https://unity.github.com) for more product-oriented

Diff for: docs/contributing/how-to-build.md

+29-12
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,34 @@ This repository is LFS-enabled. To clone it, you should use a git client that su
66

77
### Windows
88

9-
- Visual Studio 2015+ or Mono 4.x + bash shell (git bash). Mono 5.x will not work
9+
- Visual Studio 2015+ or Mono 4.x + bash shell (git bash).
10+
- Mono 5.x will not work
1011
- `UnityEngine.dll` and `UnityEditor.dll`.
1112
- If you've installed Unity in the default location of `C:\Program Files\Unity` or `C:\Program Files (x86)\Unity`, the build will be able to reference these DLLs automatically. Otherwise, you'll need to copy these DLLs from your Unity installation into the `lib` directory in order for the build to work
1213

1314
### MacOS
1415

15-
- Mono 4.x. Mono 5.x will likely not work
16+
- Mono 4.x required.
17+
- Mono 5.x will not work
1618
- `UnityEngine.dll` and `UnityEditor.dll`.
1719
- 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 your Unity installation into the `lib` directory in order for the build to work
1820

19-
## Solution organization
21+
## How to Build
2022

21-
The `GitHub.Unity.sln` solution includes several projects:
23+
Clone the repository and its submodules in a git GUI client that supports Git LFS, or via the command line with the following command:
2224

23-
- dotnet-httpclient35 and octokit: external dependencies for threading and github api support, respectively. These are the submodules.
24-
- packaging: empty projects with build rules that copy DLLs to various locations for testing
25-
- Tests: unit and integration test projects
26-
- GitHub.Logging: A logging helper library
27-
- GitHub.Api: The core of the extension. This project is C#6 and includes async/await threading and other features that Unity cannot currently compile.
28-
- GitHub.Unity: Unity-specific code. This project is compilable by Unity
25+
```
26+
git lfs clone https://github.com/github-for-unity/Unity
27+
```
2928

30-
## How to Build
29+
### Important pre-build steps
30+
31+
To be able to authenticate in GitHub for Unity, you'll need to:
32+
33+
- [Register a new developer application](https://github.com/settings/developers) in your profile.
34+
- 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.
35+
36+
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 into the `lib` directory in order for the build to work.
3137

3238
### Visual Studio
3339

@@ -39,8 +45,19 @@ To build with Mono 4.x and Bash execute `build.sh` in a bash shell.
3945

4046
## Build Output
4147

42-
Once you've built the solution for the first time, you can open `src/UnityExtension/Assets/Editor/GitHub.Unity` in Unity. This folder contains the `GitHub.Unity` project and all the Unity UI and other Unity-specific code that you can have Unity compile as normal for quick testing and prototyping.
48+
Once you've built the solution for the first time, you can open `src/UnityExtension` in Unity. This folder contains the `GitHub.Unity` project and all the Unity UI and other Unity-specific code that you can have Unity compile as normal for quick testing and prototyping.
4349

4450
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).
4551

4652
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.
53+
54+
## Solution organization
55+
56+
The `GitHub.Unity.sln` solution includes several projects:
57+
58+
- dotnet-httpclient35 and octokit: external dependencies for threading and github api support, respectively. These are the submodules.
59+
- packaging: empty projects with build rules that copy DLLs to various locations for testing
60+
- Tests: unit and integration test projects
61+
- GitHub.Logging: A logging helper library
62+
- GitHub.Api: The core of the extension. This project is C#6 and includes async/await threading and other features that Unity cannot currently compile.
63+
- GitHub.Unity: Unity-specific code. This project is compilable by Unity

Diff for: src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BranchesView.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ private void OnTreeNodeGUI(BranchTreeNode node)
612612
{
613613
EditorUtility.DisplayDialog(Localization.SwitchBranchTitle,
614614
String.Format(Localization.SwitchBranchFailedDescription, node.Name),
615-
Localization.Cancel);
615+
Localization.Ok);
616616
}
617617
}).Start();
618618
}
@@ -627,7 +627,7 @@ private void OnTreeNodeGUI(BranchTreeNode node)
627627
{
628628
EditorUtility.DisplayDialog(Localization.SwitchBranchTitle,
629629
String.Format(Localization.SwitchBranchFailedDescription, node.Name),
630-
Localization.Cancel);
630+
Localization.Ok);
631631
}
632632
}).Start();
633633
}

Diff for: src/UnityExtension/Assets/Editor/GitHub.Unity/UI/HistoryView.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ private void Pull()
679679
{
680680
EditorUtility.DisplayDialog(Localization.PullActionTitle,
681681
Localization.PullFailureDescription,
682-
Localization.Cancel);
682+
Localization.Ok);
683683
}
684684
})
685685
.Start();
@@ -702,7 +702,7 @@ private void Push()
702702
{
703703
EditorUtility.DisplayDialog(Localization.PushActionTitle,
704704
Localization.PushFailureDescription,
705-
Localization.Cancel);
705+
Localization.Ok);
706706
}
707707
})
708708
.Start();

0 commit comments

Comments
 (0)