From aeb252f9b3379d635c12298017a66490a487a2a4 Mon Sep 17 00:00:00 2001 From: Stephen Hodgson Date: Fri, 12 Feb 2021 12:46:54 -0500 Subject: [PATCH] Fixed packages installer (#784) * fixed packages installer updated string extensions bc if was super confusing and poorly written * bumped project version to 0.2.7 * added repo source url to package info * updated submodules --- Editor/PackageInstaller.cs | 2 +- Runtime/Extensions/StringExtensions.cs | 14 +++++++------- package.json | 6 +++++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Editor/PackageInstaller.cs b/Editor/PackageInstaller.cs index 9135dd35b..b7a9188ec 100644 --- a/Editor/PackageInstaller.cs +++ b/Editor/PackageInstaller.cs @@ -184,7 +184,7 @@ private static string CopyAsset(this string rootPath, string sourceAssetPath, st { sourceAssetPath = sourceAssetPath.ToForwardSlashes(); destinationPath = $"{destinationPath}{sourceAssetPath.Replace(Path.GetFullPath(rootPath), string.Empty)}".ToForwardSlashes(); - destinationPath = Path.Combine(Directory.GetParent(Application.dataPath).FullName, destinationPath); + destinationPath = Path.Combine(Directory.GetParent(Application.dataPath).FullName, destinationPath).ToForwardSlashes(); if (!File.Exists(destinationPath)) { diff --git a/Runtime/Extensions/StringExtensions.cs b/Runtime/Extensions/StringExtensions.cs index 2bd37566e..e40556b9b 100644 --- a/Runtime/Extensions/StringExtensions.cs +++ b/Runtime/Extensions/StringExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) XRTK. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using System; @@ -13,9 +13,9 @@ public static class StringExtensions { public const string WhiteSpace = " "; - public const string Backslash = "\\"; + public const string ForwardSlash = "\\"; - public const string ForwardSlash = "/"; + public const string BackSlash = "/"; /// /// Encodes the string to base 64 ASCII. @@ -77,22 +77,22 @@ public static string ToProperCase(this string value) } /// - /// Replaces all back slashes in the string with forward slashes. + /// Replaces all forward slashes in the string with back slashes. /// /// /// public static string ToBackSlashes(this string value) { - return value.Replace(Backslash, ForwardSlash); + return value.Replace(ForwardSlash, BackSlash); } /// - /// Replaces all backslashes in the string with forward slashes. + /// Replaces all back slashes in the string with forward slashes. /// /// public static string ToForwardSlashes(this string value) { - return value.Replace(ForwardSlash, Backslash); + return value.Replace(BackSlash, ForwardSlash); } } } diff --git a/package.json b/package.json index f2de72639..7dac0d889 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,13 @@ "Mixed Reality", "DI" ], - "version": "0.2.6", + "version": "0.2.7", "unity": "2019.4", "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/XRTK/XRTK-Core.git" + }, "author": "XRTK Team (https://github.com/XRTK)", "dependencies": { "com.unity.ugui": "1.0.0",