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

ProtoFlux:GetKey

From Resonite Wiki
GetKey
Dictionary
*
Key
Collections

The GetKey node takes in one of SyncRefDictionary, SyncFieldDictionary, or SyncTypeDictionary, and a key, then returns the associated value if the key exists or some zero value (null, 0, false, etc).

Known compatible types: SyncRefDictionary, SyncFieldDictionary, and SyncTypeDictionary.

Known incompatible types: IList and its subtypes (see Add (Collections) instead).

Acquiring This Node

A protoflux browser set to get key value value with object key with example valid inputs for the add value with object key node, dictionary field is filled in with sync field dictionary with types string and int, key field is filled in with string, and value field is filled in with int
Example valid inputs

When browsing to the GetKey node in the ProtoFlux Browser, there are 4 options. Which you choose is up to the dictionaries key and value types. Regardless of which you choose, there are 3 fields: TDictionary, TKey, and TValue. TDictionary takes the full type of the dictionary (e.g. SyncFieldDictionary<string,int>). TKey takes the type for the key (e.g. string). TValue takes the type for the value (e.g. int).

This node can safely be type converted when connecting an input while none of the Dictionary, Key, or Value inputs are connected.

Inputs

Dictionary (SyncRefDictionary)

The Dictionary to get from.

Key (Generic)

The key to reference the value.

Outputs

Value (Generic)

The value that the key maps to.