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

Commit 97c9571

Browse files
committed
Merge master into fixes/progress
2 parents 78df6b8 + 9901bf3 commit 97c9571

File tree

7 files changed

+113
-7
lines changed

7 files changed

+113
-7
lines changed

docs/using/getting-started.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Getting Started with GitHub for Unity
2+
There are often three states that you might be in when you are setting up your GitHub for Unity package with your Unity project:
3+
[Setting up a brand new repository](#setting-up-a-new-repository): You do not currently have your Unity project in a repository and you want to publish it to one.
4+
[Connecting to an existing respository](#connecting-to-an-existing-repository): Your Unity project is already in a repository, but you do not have the GitHub for Unity package installed within it yet.
5+
[Opening a Unity project that already has the GitHub for Unity package](#connecting-to-an-existing-repository-that-already-has-the-github-for-unity-package): Your Unity project is already in a repository and it already has the GitHub for Unity package and you are trying to setup a new machine.
6+
7+
# Setting up a New Repository
8+
When you
9+
10+
# Connecting to an Existing Respository
11+
12+
# Connecting to an Existing Repository that already has the GitHub for Unity package
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Installation and Updating Guide
2+
[Installing from a Downloaded Package File](#installing-from-a-package-file)
3+
[Installing from the Unity Asset Store](#installing-from-the-asset-store)
4+
[Updating a Previously Installed Version](#updating-the-github-for-unity-package)
5+
6+
_Note: If your Unity project already has the GitHub for Unity plugin installed, see our [Getting Started](https://github.com/github-for-unity/Unity/blob/master/docs/using/getting-started.md) docs before continuing_
7+
8+
9+
# Installing from a Package File
10+
You can download the latest release from the repository at [https://github.com/github-for-unity/Unity/releases](https://github.com/github-for-unity/Unity/releases) or from the website at [https://unity.github.com/](https://unity.github.com/).
11+
12+
Once you've downloaded the package file, you can quickly install it within Unity.
13+
1. Open a new Unity Project
14+
<img width="1001" alt="screen shot 2018-05-18 at 7 10 07 am" src="https://user-images.githubusercontent.com/1314285/40239502-1d391f4e-5a6b-11e8-8879-7342611d2759.png">
15+
2. Go to `Assets -> Import Package -> Custom Package`
16+
<img width="566" alt="screen shot 2018-05-18 at 7 11 35 am" src="https://user-images.githubusercontent.com/1314285/40239569-4131a934-5a6b-11e8-9942-2be0fcc9ded3.png">
17+
3. Find and open the GitHub for Unity Asset Package
18+
<img width="567" alt="screen shot 2018-05-18 at 7 12 33 am" src="https://user-images.githubusercontent.com/1314285/40239617-6376fc24-5a6b-11e8-9116-29eb9a450f6f.png">
19+
4. Click `Import` when the dialog pops up
20+
<img width="350" alt="screen shot 2018-05-18 at 7 12 42 am" src="https://user-images.githubusercontent.com/1314285/40239636-7101e75a-5a6b-11e8-9162-9ac9a8d8c7c1.png">
21+
5. After the package finishes importing, go to `Window -> GitHub` to open the GitHub window
22+
<img width="317" alt="screen shot 2018-05-18 at 7 13 03 am" src="https://user-images.githubusercontent.com/1314285/40239656-83597d5a-5a6b-11e8-8cba-3d3a79c90974.png">
23+
6. You should see the GitHub window in your Unity project, with a button to initialize your repository
24+
<img width="1069" alt="screen shot 2018-05-18 at 7 13 34 am" src="https://user-images.githubusercontent.com/1314285/40239682-9344314c-5a6b-11e8-961f-2293434aa1ea.png">
25+
26+
# Installing from the Asset Store
27+
1. Open a new Unity Project
28+
<img width="1001" alt="screen shot 2018-05-18 at 7 10 07 am" src="https://user-images.githubusercontent.com/1314285/40239502-1d391f4e-5a6b-11e8-8879-7342611d2759.png">
29+
2. Go to `Window -> Asset Store`
30+
<img width="1115" alt="screen shot 2018-05-18 at 7 20 19 am" src="https://user-images.githubusercontent.com/1314285/40239800-f1a3cd6a-5a6b-11e8-9b81-54f2b947b3b9.png">
31+
3. Search for "GitHub" in the search bar
32+
<img width="246" alt="screen shot 2018-05-18 at 7 20 51 am" src="https://user-images.githubusercontent.com/1314285/40240012-6cedab6c-5a6c-11e8-844e-47bf8b836edb.png">
33+
4. Click on the GitHub for Unity Package
34+
<img width="194" alt="screen shot 2018-05-18 at 7 22 15 am" src="https://user-images.githubusercontent.com/1314285/40240031-78d16036-5a6c-11e8-9052-d5e439858068.png">
35+
5. Click `Download` then `Install`
36+
<img width="156" alt="screen shot 2018-05-18 at 7 21 37 am" src="https://user-images.githubusercontent.com/1314285/40240039-7f7bc318-5a6c-11e8-8596-f7f6d7e8e48a.png">
37+
<img width="152" alt="screen shot 2018-05-18 at 7 21 44 am" src="https://user-images.githubusercontent.com/1314285/40240048-84c391de-5a6c-11e8-82bb-f4ee27871ab4.png">
38+
6. Click `Import` when the dialog pops up
39+
<img width="350" alt="screen shot 2018-05-18 at 7 12 42 am" src="https://user-images.githubusercontent.com/1314285/40239636-7101e75a-5a6b-11e8-9162-9ac9a8d8c7c1.png">
40+
7. After the package finishes importing, go to `Window -> GitHub` to open the GitHub window
41+
<img width="317" alt="screen shot 2018-05-18 at 7 13 03 am" src="https://user-images.githubusercontent.com/1314285/40239656-83597d5a-5a6b-11e8-8cba-3d3a79c90974.png">
42+
8. You should see the GitHub window in your Unity project, with a button to initialize your repository
43+
<img width="1069" alt="screen shot 2018-05-18 at 7 13 34 am" src="https://user-images.githubusercontent.com/1314285/40239682-9344314c-5a6b-11e8-961f-2293434aa1ea.png">
44+
45+
# Updating the GitHub for Unity Package
46+
_COMING SOON_

src/GitHub.Api/Localization.Designer.cs

Lines changed: 20 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.Api/Localization.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,12 @@
345345
<data name="Window_RepoUrlTooltip" xml:space="preserve">
346346
<value>Url of the {0} remote</value>
347347
</data>
348+
<data name="ReleaseLockActionTitle" xml:space="preserve">
349+
<value>Release Lock</value>
350+
</data>
351+
<data name="RequestLockActionTitle" xml:space="preserve">
352+
<value>Request Lock</value>
353+
</data>
348354
<data name="AccountButton" xml:space="preserve">
349355
<value>Account</value>
350356
</data>

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ private static void ContextMenu_Lock()
108108
{
109109
EntryPoint.ApplicationManager.TaskManager.Run(EntryPoint.ApplicationManager.UsageTracker.IncrementUnityProjectViewContextLfsLock, null);
110110
}
111+
else
112+
{
113+
EditorUtility.DisplayDialog(Localization.RequestLockActionTitle,
114+
ex.Message,
115+
Localization.Ok);
116+
}
111117

112118
isBusy = false;
113119
Selection.activeGameObject = null;
@@ -154,6 +160,13 @@ private static void ContextMenu_Unlock()
154160
{
155161
EntryPoint.ApplicationManager.TaskManager.Run(EntryPoint.ApplicationManager.UsageTracker.IncrementUnityProjectViewContextLfsUnlock, null);
156162
}
163+
else
164+
{
165+
EditorUtility.DisplayDialog(Localization.ReleaseLockActionTitle,
166+
ex.Message,
167+
Localization.Ok);
168+
}
169+
157170
isBusy = false;
158171
Selection.activeGameObject = null;
159172
EditorApplication.RepaintProjectWindow();

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/SettingsView.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,19 @@ private void OnGitLfsLocksGUI()
298298
if (GUILayout.Button("Unlock"))
299299
{
300300
Repository.ReleaseLock(lck.Path, true)
301-
.Then(UsageTracker.IncrementSettingsViewButtonLfsUnlock)
301+
.FinallyInUI((success, ex) =>
302+
{
303+
if (success)
304+
{
305+
TaskManager.Run(UsageTracker.IncrementSettingsViewButtonLfsUnlock);
306+
}
307+
else
308+
{
309+
EditorUtility.DisplayDialog(Localization.ReleaseLockActionTitle,
310+
ex.Message,
311+
Localization.Ok);
312+
}
313+
})
302314
.Start();
303315
}
304316
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ private void Pull()
687687
{
688688
SetProgressMessage(Localization.MessagePullFailed, 100);
689689
EditorUtility.DisplayDialog(Localization.PullActionTitle,
690-
Localization.PullFailureDescription,
690+
e.Message,
691691
Localization.Ok);
692692
}
693693
})
@@ -715,7 +715,7 @@ private void Push()
715715
{
716716
SetProgressMessage(Localization.MessagePushFailed, 100);
717717
EditorUtility.DisplayDialog(Localization.PushActionTitle,
718-
Localization.PushFailureDescription,
718+
e.Message,
719719
Localization.Ok);
720720
}
721721
})
@@ -737,8 +737,7 @@ private void Fetch()
737737
else
738738
{
739739
SetProgressMessage(Localization.MessageFetchFailed, 100);
740-
EditorUtility.DisplayDialog(Localization.FetchActionTitle, Localization.FetchFailureDescription,
741-
Localization.Ok);
740+
EditorUtility.DisplayDialog(Localization.FetchActionTitle, e.Message, Localization.Ok);
742741
}
743742
})
744743
.Start();

0 commit comments

Comments
 (0)