Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktHensen committed Mar 28, 2021
2 parents 1554e91 + 16ad054 commit e01d961
Show file tree
Hide file tree
Showing 44 changed files with 2,508 additions and 101 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This document keeps track of the changes between versions of the toolkit.

## 1.4.0 (2021-03-28)

### Added
- Added support for GitHub OpenID Connect login
- Added an option to the `IRestConnector` interface methods to specify a header dictionary
- Added an option to the `UnityWebRestConnector` to process a supplied header dictionary
- Added an example for the GitHub OpenID Connect login
- Added an example that shows how to use multiple OpenID Connect providers in parallel

## 1.3.4 (2021-03-18)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Documentation~/i5-Toolkit-for-Unity.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Documentation of the i5 Toolkit for Unity

Click [here](https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/index.html) to go to the documentation pages for version 1.3.4 of the package.
Click [here](https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/index.html) to go to the documentation pages for version 1.4.0 of the package.
57 changes: 30 additions & 27 deletions Editor/Scene Documentation/Scripts/SceneDocumentationInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,45 @@
using UnityEditor;
using UnityEngine;

/// <summary>
/// Initializes the scene documentation resources
/// </summary>
[InitializeOnLoad]
public class SceneDocumentationInitializer
namespace i5.Toolkit.Core.SceneDocumentation
{
/// <summary>
/// Static constructor which copies the gizmos files from the textures folder to the Assets/Gizmos folder
/// Initializes the scene documentation resources
/// </summary>
static SceneDocumentationInitializer()
[InitializeOnLoad]
public class SceneDocumentationInitializer
{
if (!Directory.Exists("Assets/Gizmos"))
/// <summary>
/// Static constructor which copies the gizmos files from the textures folder to the Assets/Gizmos folder
/// </summary>
static SceneDocumentationInitializer()
{
Directory.CreateDirectory("Assets/Gizmos");
Debug.Log("[SceneDocumentationInitializer] Created Gizmos folder");
}
if (!Directory.Exists("Assets/Gizmos"))
{
Directory.CreateDirectory("Assets/Gizmos");
Debug.Log("[SceneDocumentationInitializer] Created Gizmos folder");
}

string packageLocation = PathUtils.GetPackagePath();
string packageLocation = PathUtils.GetPackagePath();

EnsureFile(packageLocation, "Bug.png");
EnsureFile(packageLocation, "Todo.png");
EnsureFile(packageLocation, "Info.png");
}
EnsureFile(packageLocation, "Bug.png");
EnsureFile(packageLocation, "Todo.png");
EnsureFile(packageLocation, "Info.png");
}

/// <summary>
/// Ensures that the file with the given name exists in the Gizmos folder
/// If it does not exist, it is copied from the textures folder
/// </summary>
/// <param name="packageLocation">The path where the package is located in the project</param>
/// <param name="filename">The filename of the gizmos icon</param>
private static void EnsureFile(string packageLocation, string filename)
{
if (!File.Exists("Assets/Gizmos/" + filename))
/// <summary>
/// Ensures that the file with the given name exists in the Gizmos folder
/// If it does not exist, it is copied from the textures folder
/// </summary>
/// <param name="packageLocation">The path where the package is located in the project</param>
/// <param name="filename">The filename of the gizmos icon</param>
private static void EnsureFile(string packageLocation, string filename)
{
File.Copy(packageLocation + "Editor/Scene Documentation/Textures/" + filename, "Assets/Gizmos/" + filename);
Debug.Log("[SceneDocumentationInitializer] Copied " + filename + " to Gizmos folder");
if (!File.Exists("Assets/Gizmos/" + filename))
{
File.Copy(packageLocation + "Editor/Scene Documentation/Textures/" + filename, "Assets/Gizmos/" + filename);
Debug.Log("[SceneDocumentationInitializer] Copied " + filename + " to Gizmos folder");
}
}
}
}
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ It is a foundation for new projects, kickstarting the development with already c

![Continuous Integration](https://github.com/rwth-acis/i5-Toolkit-for-Unity/workflows/Continuous%20Integration/badge.svg)

![1.3.4](https://img.shields.io/badge/version-1.3.4-blue)
![1.4.0](https://img.shields.io/badge/version-1.4.0-blue)

[![openupm](https://img.shields.io/npm/v/com.i5.toolkit.core?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.i5.toolkit.core/)

Expand All @@ -17,22 +17,22 @@ The i5 Toolkit provides a series of modules and features that can be used in pro

<table style="text-align: center; vertical-align: middle">
<tr>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/App-Console.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/AppConsole.svg" alt="App Console" style="width:200px"/><br/>App Console</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Modified-3D-Objects.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/RoundedCorners.svg" alt="Modified 3D Objects" style="width:200px"/><br/>Modified 3D Models</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Object-Pool.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/ObjectPool.svg" alt="Object Pool" style="width:200px"/><br/>Object Pool</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/App-Console.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/AppConsole.svg" alt="App Console" style="width:200px"/><br/>App Console</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Modified-3D-Objects.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/RoundedCorners.svg" alt="Modified 3D Objects" style="width:200px"/><br/>Modified 3D Models</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Object-Pool.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/ObjectPool.svg" alt="Object Pool" style="width:200px"/><br/>Object Pool</a></td>
</tr>
<tr>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Obj-Importer.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/ObjImporter.svg" alt="Obj Importer" style="width:200px"/><br/>Obj Importer</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/OpenID-Connect-Client.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/OpenIDConnectClient.svg" alt="OpenID Connect Client" style="width:200px"/><br/>OpenID Connect Client</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Procedural-Geometry.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/ProceduralGeometry.svg" alt="Procedural Geometry" style="width:200px"/><br/>Procedural Geometry</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Obj-Importer.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/ObjImporter.svg" alt="Obj Importer" style="width:200px"/><br/>Obj Importer</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/OpenID-Connect-Client.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/OpenIDConnectClient.svg" alt="OpenID Connect Client" style="width:200px"/><br/>OpenID Connect Client</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Procedural-Geometry.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/ProceduralGeometry.svg" alt="Procedural Geometry" style="width:200px"/><br/>Procedural Geometry</a></td>
</tr>
<tr>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Scene-Documentation.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/SceneDocumentation.svg" alt="Scene Documentation" style="width:200px"/><br/>Scene Documentation</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Service-Core.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/ServiceCore.svg" alt="Service Core" style="width:200px"/><br/>Service Core</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Spawner.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/Spawner.svg" alt="Spawner" style="width:200px"/><br/>Spawner</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Scene-Documentation.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/SceneDocumentation.svg" alt="Scene Documentation" style="width:200px"/><br/>Scene Documentation</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Service-Core.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/ServiceCore.svg" alt="Service Core" style="width:200px"/><br/>Service Core</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Spawner.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/Spawner.svg" alt="Spawner" style="width:200px"/><br/>Spawner</a></td>
</tr>
<tr>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/manual/Version-Tool.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.3.4/resources/Logos/Version-Tool.svg" alt="Version Tool" style="width:200px"/><br/>Version Tool</a></td>
<td><a href="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/manual/Version-Tool.html"><img src="https://rwth-acis.github.io/i5-Toolkit-for-Unity/1.4.0/resources/Logos/Version-Tool.svg" alt="Version Tool" style="width:200px"/><br/>Version Tool</a></td>
</tr>
</table>

Expand All @@ -59,7 +59,7 @@ To do this, add an entry to the dependency file:
}
```

4. To add a specific version of the tool to the dependencies, add the following line inside of the "dependencies" object and replace [version] by the release number, e.g. "1.3.4".
4. To add a specific version of the tool to the dependencies, add the following line inside of the "dependencies" object and replace [version] by the release number, e.g. "1.4.0".
`"com.i5.toolkit.core": "[version]",`
After that, Unity will automatically download and import the package.

Expand All @@ -78,7 +78,7 @@ So, after completing these steps you should have a manifest.json file which look
... some more scoped registries
],
"dependencies": {
"com.i5.toolkit.core": "1.3.4",
"com.i5.toolkit.core": "1.4.0",
... some more packages
}
}
Expand All @@ -92,7 +92,7 @@ It can be included in new projects by referencing the git-repository on GitHub i
1. Open your project's root folder in a file explorer.
2. Navigate to the Packages folder and open the file manifest.json.
It contains a list of package dependencies which are loaded into the project.
3. To add a specific version of the tool to the dependencies, add the following line inside of the "dependencies" object and replace [version] with "v", followed by the release number, e.g. "v1.3.4".
3. To add a specific version of the tool to the dependencies, add the following line inside of the "dependencies" object and replace [version] with "v", followed by the release number, e.g. "v1.4.0".
To receive the latest version, replace [version] with upm.
`"com.i5.toolkit.core": "https://github.com/rwth-acis/i5-Toolkit-for-Unity.git#[version]",`
After that, Unity will automatically download and import the package.
Expand All @@ -107,7 +107,7 @@ The package can be downloaded from a git-repository in the package manager's UI.

1. In Unity, go to Window > Package Manger.
2. Click on the plus-button in the top left corner of the package manager and select "add".
3. Enter https://github.com/rwth-acis/i5-Toolkit-for-Unity.git#[version] into the text field where [version] is replaced with "v", followed by the release number, e.g. "v1.3.4" or upm for the latest version.
3. Enter https://github.com/rwth-acis/i5-Toolkit-for-Unity.git#[version] into the text field where [version] is replaced with "v", followed by the release number, e.g. "v1.4.0" or upm for the latest version.
Confirm the download by clicking on the "add" button.

If you specify "upm" to get the latest version, be aware that the package is not automatically updated.
Expand Down
8 changes: 8 additions & 0 deletions Runtime/OpenID Connect/Scripts/OIDC Providers/Git Hub.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;

namespace i5.Toolkit.Core.OpenIDConnectClient
{
/// <summary>
/// Data description of the answer that is received after the access token was requested in the
/// authorization flow
/// </summary>
[Serializable]
public class GitHubAuthorizationFlowAnswer
{
public string access_token;
public string scope;
public string token_type;

}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e01d961

Please sign in to comment.