diff --git a/Editor/SpatialPersistence_ARFoundationPackageInstaller.cs b/Editor/SpatialPersistence_ARFoundationPackageInstaller.cs index 9907fb5..1e6e740 100644 --- a/Editor/SpatialPersistence_ARFoundationPackageInstaller.cs +++ b/Editor/SpatialPersistence_ARFoundationPackageInstaller.cs @@ -5,8 +5,6 @@ using RealityCollective.ServiceFramework.Editor.Packages; using RealityCollective.Utilities.Editor; using RealityCollective.Utilities.Extensions; -using RealityToolkit.Editor; -using RealityToolkit.Editor.Settings; using System.IO; using UnityEditor; @@ -15,21 +13,24 @@ namespace RealityToolkit.SpatialPersistence.ARFoundation.Editor [InitializeOnLoad] internal static class SpatialPersistence_ARFoundationPackageInstaller { - private static readonly string destinationPath = Path.Combine(RealityToolkitEditorSettings.Instance.AssetImportPath, "SpatialPersistence_ARFoundation"); - private static readonly string sourcePath = Path.GetFullPath($"{PathFinderUtility.ResolvePath(typeof(SpatialPersistence_ARFoundationPackagePathFinder)).ForwardSlashes()}{Path.DirectorySeparatorChar}{RealityToolkitPreferences.HIDDEN_PACKAGE_ASSETS_PATH}"); + public const string HIDDEN_PACKAGE_ASSETS_PATH = "Assets~"; + public const string Editor_Menu_Keyword = "Tools/Reality Toolkit"; + private const string assetImportPath = "Assets/RealityToolkit.Generated/"; + private static readonly string destinationPath = Path.Combine(assetImportPath, "SpatialPersistence_ARFoundation"); + private static readonly string sourcePath = Path.GetFullPath($"{PathFinderUtility.ResolvePath(typeof(SpatialPersistence_ARFoundationPackagePathFinder)).ForwardSlashes()}{Path.DirectorySeparatorChar}{HIDDEN_PACKAGE_ASSETS_PATH}"); static SpatialPersistence_ARFoundationPackageInstaller() { EditorApplication.delayCall += CheckPackage; } - [MenuItem(RealityToolkitPreferences.Editor_Menu_Keyword + "/Packages / Install SpatialPersistence_ARFoundation Package Assets...", true)] + [MenuItem(Editor_Menu_Keyword + "/Packages / Install SpatialPersistence_ARFoundation Package Assets...", true)] private static bool ImportPackageAssetsValidation() { return !Directory.Exists($"{destinationPath}{Path.DirectorySeparatorChar}"); } - [MenuItem(RealityToolkitPreferences.Editor_Menu_Keyword + "/Packages / Install SpatialPersistence_ARFoundation Package Assets...")] + [MenuItem(Editor_Menu_Keyword + "/Packages / Install SpatialPersistence_ARFoundation Package Assets...")] private static void ImportPackageAssets() { EditorPreferences.Set($"{nameof(SpatialPersistence_ARFoundationPackageInstaller)}.Assets", false);