File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Runtime/Randomization/Parameters Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ Upgraded capture package dependency to 0.0.10-preview.22 to fix an issue with UR
3131### Fixed
3232Fixed keypoint labeling bug when visualizations are disabled.
3333
34+ Fixed an issue where Simulation Delta Time values larger than 100 seconds (in Perception Camera) would cause incorrect capture scheduling behavior.
35+
36+ Fixed an issue where Categorical Parameters sometimes tried to fetch items at ` i = categories.Count ` , which caused an exception.
37+
3438## [ 0.8.0-preview.3] - 2021-03-24
3539### Changed
3640
Original file line number Diff line number Diff line change @@ -175,9 +175,13 @@ int BinarySearch(float key) {
175175 public T Sample ( )
176176 {
177177 var randomValue = m_Sampler . Sample ( ) ;
178- return uniform
179- ? m_Categories [ ( int ) ( randomValue * m_Categories . Count ) ]
180- : m_Categories [ BinarySearch ( randomValue ) ] ;
178+ if ( uniform )
179+ {
180+ var index = ( int ) ( randomValue * m_Categories . Count ) ;
181+ index = index == m_Categories . Count ? index - 1 : index ;
182+ return m_Categories [ index ] ;
183+ }
184+ return m_Categories [ BinarySearch ( randomValue ) ] ;
181185 }
182186
183187 /// <summary>
You can’t perform that action at this time.
0 commit comments