You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO FIXME, this gets called everytime for same projects?
51
+
// add found projects to history also (gets added only if its not already there)
52
+
Tools.AddProjectToHistory(project.Path);
53
+
});
54
+
55
+
// NOTE those 40 projects should be added to custom list, otherwise they will disappear (since last item is not yet added to our list, until its launched once, so need to launch many projects, to start collecting history..)
56
+
// but then we would have to loop here again..? or add in the loop above..if doesnt exists on list, and the remove extra items from the end
57
+
58
+
// scan info for custom folders (if not already on the list)
59
+
if(AllProjectPaths!=null)
60
+
{
61
+
// iterate custom full projects history
62
+
foreach(varprojectPathinAllProjectPaths)
63
+
{
64
+
// check if registry list contains this path already
65
+
// if not found from registry, add to recent projects list
// sometimes projects are in wrong order, seems to be related to messing up your unity registry, the keys are received in created order (so if you had removed/modified them manually, it might return wrong order instead of 0 - 40)
75
+
// sort by modified date, projects without modified date are put to last, NOTE: this would remove projects without modified date (if they become last items, before trimming list on next step)
76
+
projectsFound.Sort((x,y)=>
77
+
{
78
+
if(x.Modified==null&&y.Modified==null)return0;// cannot be -1, https://stackoverflow.com/a/42821992/5452781
//return x.Modified.Value.CompareTo(y.Modified.Value); // BUG this breaks something, so that last item platform is wrong (for project that is missing from disk) ?
83
+
});
84
+
85
+
// trim list to max amount (older ones are dropped)
// if want to hide project and folder path for screenshot
60
138
//p.Title = "Example Project";
61
139
//p.Path = "C:/Projects/MyProj";
62
-
63
140
if(p!=null)
64
141
{
65
-
projectsFound.Add(p);
66
-
67
-
// TODO FIXME, this gets called everytime for same projects?
68
-
// add found projects to history also (gets added only if its not already there)
69
-
Tools.AddProjectToHistory(p.Path);
142
+
visitor(p);
70
143
}
71
144
}// valid key
72
145
}// each key
73
146
}// for each registry root
147
+
}// VisitProjectsInRegistry()
74
148
75
-
// NOTE those 40 projects should be added to custom list, otherwise they will disappear (since last item is not yet added to our list, until its launched once, so need to launch many projects, to start collecting history..)
76
-
// but then we would have to loop here again..? or add in the loop above..if doesnt exists on list, and the remove extra items from the end
// sometimes projects are in wrong order, seems to be related to messing up your unity registry, the keys are received in created order (so if you had removed/modified them manually, it might return wrong order instead of 0 - 40)
105
-
// sort by modified date, projects without modified date are put to last, NOTE: this would remove projects without modified date (if they become last items, before trimming list on next step)
106
-
projectsFound.Sort((x,y)=>
107
-
{
108
-
if(x.Modified==null&&y.Modified==null)return0;// cannot be -1, https://stackoverflow.com/a/42821992/5452781
//return x.Modified.Value.CompareTo(y.Modified.Value); // BUG this breaks something, so that last item platform is wrong (for project that is missing from disk) ?
113
-
});
224
+
searchFrom=entryEnd+1;
225
+
}
226
+
}
114
227
115
-
// trim list to max amount (older ones are dropped)
0 commit comments