Skip to content

Commit dabd6a7

Browse files
committed
feat: prevent broken atlas names from being loaded
1 parent 90b0cd1 commit dabd6a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ public async void Startup()
166166

167167
// Load Atlas
168168
// Settings.AtlasName returns CCF if PlayerPrefs is cleared, otherwise returns the previous atlas setting
169-
await BrainAtlasManager.LoadAtlas(Settings.AtlasName);
169+
string atlasName = Settings.AtlasName;
170+
if (!BrainAtlasManager.AtlasNames.Contains(atlasName))
171+
atlasName = "allen_mouse_25um";
172+
173+
await BrainAtlasManager.LoadAtlas(atlasName);
170174
ReferenceAtlas referenceAtlas = BrainAtlasManager.ActiveReferenceAtlas;
171175

172176
// Set the reference coordinate before anything else happen

0 commit comments

Comments
 (0)