diff --git a/Editor/PackageUpdater.cs b/Editor/PackageUpdater.cs deleted file mode 100644 index 46fc901..0000000 --- a/Editor/PackageUpdater.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.IO; -using UnityEditor; -using UnityEngine; - -namespace Utils -{ - public class PackgeUpdater - { - private static string ManifestPath - { - get - { - var projectPath = Directory.GetParent(Application.dataPath).FullName; - var manifestPath = Path.Combine(projectPath, "Packages", "manifest.json"); - return manifestPath; - } - } - - public static string GetIdentifier(string input, char charFrom, char charTo) - { - var first = input.IndexOf(charFrom); - var second = input.IndexOf(charTo, first + 1); - var posFrom = input.IndexOf(charFrom, second + 1); - if (posFrom != -1) //if found char - { - var posTo = input.IndexOf(charTo, posFrom + 1); - if (posTo != -1) //if found char - { - return input.Substring(posFrom + 1, posTo - posFrom - 1); - } - } - - return string.Empty; - } - - [MenuItem("Assets/Update Git Packages", false, 1000)] - private static void UpdateGitPackages() - { - var lines = File.ReadAllLines(ManifestPath); - foreach (var line in lines) - { - if (line.Contains("git")) - { - var identifier = GetIdentifier(line, '"', '"'); - Debug.Log("Checking for updates " + identifier); - UnityEditor.PackageManager.Client.Add(identifier); - } - } - } - } -} diff --git a/Editor/PackageUpdater.cs.meta b/Editor/PackageUpdater.cs.meta deleted file mode 100644 index f28439e..0000000 --- a/Editor/PackageUpdater.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ce75a6f4e95d89b4eba151eb7d16a6ff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/README.md b/README.md index 0a67fa4..abb4dc9 100644 --- a/README.md +++ b/README.md @@ -9,5 +9,3 @@ Unity package with utility useful for almost any project. * Automatic volume based reflection probe placer. * Check how much time has passed with the Time Since struct. * Camera Blender controls in the scene view. -* Package Manager Git updater. -* Append to an array. \ No newline at end of file diff --git a/Runtime/ArrayExtensions.cs b/Runtime/ArrayExtensions.cs deleted file mode 100644 index ac83fe8..0000000 --- a/Runtime/ArrayExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Utils -{ - public static class ArrayExtensions - { - public static T[] Append(this T[] array, T item) - { - if (array == null) - { - return new T[] { item }; - } - - var result = new T[array.Length + 1]; - for (var i = 0; i < array.Length; i++) - { - result[i] = array[i]; - } - - result[array.Length] = item; - return result; - } - } -} diff --git a/Runtime/ArrayExtensions.cs.meta b/Runtime/ArrayExtensions.cs.meta deleted file mode 100644 index 1737d32..0000000 --- a/Runtime/ArrayExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6e14f8172d2e1b345bd36b974bcaeb61 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/package.json b/package.json index a453450..213061f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ru.shazbot.utils", - "version": "5.0.0", + "version": "5.1.0", "displayName": "Utils", "description": "Utility useful for almost any project.", "licensesUrl": "https://git.shazbot.ru/Utils.git/tree/LICENSE.md",