File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Packages/com.chark.scriptable-scenes Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1414### Changed
1515
1616- Menu item order to use ` 150 ` instead of ` -1000 ` . This way ` CHARK ` won't dominate existing entries.
17+ - Editor Prefs will now use project directory name as identifier, this should prevent issues when using Parallel Sync and similar plugins.
1718
1819### Fixed
1920
Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
2+ using System . IO ;
23using System . Linq ;
34using CHARK . ScriptableScenes . Events ;
45using UnityEngine ;
@@ -12,8 +13,21 @@ namespace CHARK.ScriptableScenes.Utilities
1213 /// </summary>
1314 internal static class ScriptableSceneUtilities
1415 {
15- private static readonly string SelectedCollectionKey =
16- typeof ( ScriptableSceneUtilities ) . FullName + "_" + "Guids" ;
16+ private static string SelectedCollectionKey
17+ {
18+ get
19+ {
20+ var projectAssetDirPath = Application . dataPath ;
21+ var projectDirPath = Path . GetDirectoryName ( projectAssetDirPath ) ;
22+
23+ // Project dir is used as id for editor keys, useful when using Parallel sync or similar.
24+ var projectId = string . IsNullOrWhiteSpace ( projectAssetDirPath )
25+ ? Application . productName
26+ : Path . GetFileName ( projectDirPath ) ;
27+
28+ return $ "{ nameof ( ScriptableSceneUtilities ) } .{ projectId } .SelectedCollection";
29+ }
30+ }
1731
1832 /// <returns>
1933 /// <c>true</c> if scene information is retrieved for <paramref name="obj"/> or
You can’t perform that action at this time.
0 commit comments