From 40dde5c350b6f764aa999eadc0b0204bc06fc2f5 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 22 Jun 2023 20:37:40 +0100 Subject: [PATCH] :package: 1.1.4 Update - A hotfix to a compatibility issue with the asset and others that use the same indexing system UtilEditor.cs class name. This update should correct that. --- Code/Editor/Settings/AssetVersionData.cs | 4 ++-- Code/Editor/Utility/UtilEditor.cs | 14 +++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Code/Editor/Settings/AssetVersionData.cs b/Code/Editor/Settings/AssetVersionData.cs index c8e5251..5275d0c 100644 --- a/Code/Editor/Settings/AssetVersionData.cs +++ b/Code/Editor/Settings/AssetVersionData.cs @@ -35,12 +35,12 @@ public static class AssetVersionData /// /// The version number of the asset... /// - public static string VersionNumber => "1.1.3"; + public static string VersionNumber => "1.1.4"; /// /// The date this release of the asset was submitted for release... /// - public static string ReleaseDate => "11/06/2023"; + public static string ReleaseDate => "22/06/2023"; } } \ No newline at end of file diff --git a/Code/Editor/Utility/UtilEditor.cs b/Code/Editor/Utility/UtilEditor.cs index 8309f66..c920cc0 100644 --- a/Code/Editor/Utility/UtilEditor.cs +++ b/Code/Editor/Utility/UtilEditor.cs @@ -81,10 +81,18 @@ private static string AssetBasePath { get { - var script = AssetDatabase.FindAssets($"t:Script {nameof(UtilEditor)}")[0]; - var path = AssetDatabase.GUIDToAssetPath(script); + string path = string.Empty; + + foreach (var scriptFound in AssetDatabase.FindAssets($"t:Script {nameof(UtilEditor)}")) + { + path = AssetDatabase.GUIDToAssetPath(scriptFound); + + if (!path.Contains("Build Versions") || !path.Contains("/UtilEditor.cs")) continue; + path = AssetDatabase.GUIDToAssetPath(scriptFound); + path = path.Replace("/Carter Games/Build Versions/Code/Editor/Utility/UtilEditor.cs", ""); + return path; + } - path = path.Replace("/Carter Games/Build Versions/Code/Editor/Utility/UtilEditor.cs", ""); return path; } }