Skip to content

Commit

Permalink
feat: prevent broken atlas names from being loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
dbirman committed Jan 18, 2024
1 parent 90b0cd1 commit dabd6a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Assets/Scripts/Pinpoint/TrajectoryPlannerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ public async void Startup()

// Load Atlas
// Settings.AtlasName returns CCF if PlayerPrefs is cleared, otherwise returns the previous atlas setting
await BrainAtlasManager.LoadAtlas(Settings.AtlasName);
string atlasName = Settings.AtlasName;
if (!BrainAtlasManager.AtlasNames.Contains(atlasName))
atlasName = "allen_mouse_25um";

await BrainAtlasManager.LoadAtlas(atlasName);
ReferenceAtlas referenceAtlas = BrainAtlasManager.ActiveReferenceAtlas;

// Set the reference coordinate before anything else happen
Expand Down

0 comments on commit dabd6a7

Please sign in to comment.