File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Assets/JCSUnity/Scripts/Util
docs/ScriptReference/Util Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -95,5 +95,10 @@ public static T ChooseOne<T>(List<T> inList)
9595 int index = Range ( 0 , inList . Count ) ;
9696 return inList [ index ] ;
9797 }
98+ public static T ChooseOneE < T > ( params T [ ] args ) // Ellipsis
99+ {
100+ int index = Range ( 0 , args . Length ) ;
101+ return args [ index ] ;
102+ }
98103 }
99104}
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ Random library class.
44
55## Functions
66
7- | Name | Description |
8- | :-------------| :---------------------------------|
9- | Range | Default random range wrapper. |
10- | RaneeInclude | Include the maxinum number. |
11- | RandomColor | Returns a random color. |
12- | ChooseOne | Choose one object from the list. |
7+ | Name | Description |
8+ | :-------------| :--------------------------------------------|
9+ | Range | Default random range wrapper. |
10+ | RaneeInclude | Include the maxinum number. |
11+ | RandomColor | Returns a random color. |
12+ | ChooseOne | Choose one object from the list. |
13+ | ChooseOneE | Choose one object from the list. (Ellipsis) |
You can’t perform that action at this time.
0 commit comments