Range library¶
A view represents an iterable sequence (it doesn't contain any container data)
There are two types of views:
- Iterator: Modify Begin, End and Next of the loop
- Predicate: Returns the element if the predicate is true
ForRange¶
A loop that can use multiple views (reverse, even etc ...)
How it works¶
The ForRange loop will iterate over a container and filter the results depending on the selected views
Example
Create new views from blueprint¶
- Create a new blueprint function library
- Create a new function
- Create an input parameter that must be named
__Element
of the desired type - Create an output parameter that must be named
__Return
of typebool
- Create an input parameter that must be named
- Write the function code and restart the editor
Views¶
ActorInRange¶
Parameter | |
---|---|
Origin |
Location of origin |
Range |
Maximum range between Origin and Actor location |
Even¶
Range¶
Reverse¶
Reverse elements order in a view