diff --git a/XRTK-Core/Packages/com.xrtk.core/Inspectors/Extensions/ScriptableObjectExtensions.cs b/XRTK-Core/Packages/com.xrtk.core/Inspectors/Extensions/ScriptableObjectExtensions.cs index 982f724a8..5a0cc346e 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Inspectors/Extensions/ScriptableObjectExtensions.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Inspectors/Extensions/ScriptableObjectExtensions.cs @@ -52,6 +52,8 @@ public static ScriptableObject CreateAsset(this ScriptableObject scriptableObjec path = MixedRealityPreferences.ProfileGenerationPath; } + path = path.Replace(".asset", string.Empty); + if (!string.IsNullOrWhiteSpace(Path.GetExtension(path))) { var subtractedPath = path.Substring(path.LastIndexOf("/", StringComparison.Ordinal)); @@ -63,7 +65,7 @@ public static ScriptableObject CreateAsset(this ScriptableObject scriptableObjec Directory.CreateDirectory(Path.GetFullPath(path)); } - path = path.Replace(".asset", string.Empty); + path = path.Replace($"{Directory.GetParent(Application.dataPath).FullName}\\", string.Empty); string assetPathAndName = AssetDatabase.GenerateUniqueAssetPath($"{path}/{name}.asset");