Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ProtoFlux:Count

From Resonite Wiki
Count
Collection
*
Collections

The Count node takes in a Collection and returns the number of elements (list/array) or number of KeyValuePairs (dictionary).

Since lists and arrays are zero indexed in Resonite, the last element in the list/array is at count minus 1.

Known compatible types: any collection.

Known incompatible types: none.

Acquiring This Node

When selecting this node in the ProtoFlux Browser, it will present you with 3 options. If your collection is read only, select the read only option, otherwise select the option with both a collection and value inputs. TCollection takes in the full type name of the collection (e.g. SyncRefDictionary<string,Slot> or SyncArray<floatQ>), and TValue takes in the type of the thing that it stores (e.g. KeyValuePair<string,Slot> or floatQ). For dictionary types, TValue is a KeyValuePair matching the types of the dictionary.

a proto flux browser creating a count node where the collection field is filled in with sync ref dictionary with key type string and value type slot and the value field is filled in with key value pair with key type string and value type slot
Example valid inputs

Count can be safely type casted.

Inputs

Collection (IList)

The collection to count from.

Outputs

* (Int)

The total number of elements (list/array) or the number of key value pairs (dictionary).