VRC SDK
This project aims to completely document the VRChat Unity SDK
|
Data Dictionaries store Data Tokens by key-value pair, similarly to C# Dictionaries. Most Data Dictionary functions are just wrappers for the underlying C# dictionary, so the C# dictionary documentation also applies if you are looking for more specific details. Both the keys and the values of a Data Dictionary are Data Tokens. This means that you can effectively use anything for your keys. However, if you intend to serialize to VRCJSON, only string keys are supported. More...
Public Member Functions | |
virtual void | SetValue (DataToken key, DataToken value) |
Sets the value at the specified key. If that key does not exist, a new one will be added. More... | |
bool | TryGetValue (DataToken key, TokenType type, out DataToken value) |
This is not documented properly yet More... | |
bool | TryGetValue (DataToken key, out DataToken value) |
This is not documented properly yet More... | |
DataDictionary | ShallowClone () |
Clones the DataDictionary into a new DataDictionary that contains all the same values. Unlike DeepClone, this means that if the DataDictionary contains other DataLists and DataDictionaries, those will still be the same reference. More... | |
DataDictionary | DeepClone () |
Clones the DataDictionary into a new DataDictionary that contains all the same values. Unlike ShallowClone, deep clone means that it will recursively navigate inside each DataList or DataDictionary and copy their contents as well. Items with the TokenType "Reference" will maintain the same reference as the original and not be deep cloned, which includes arrays. More... | |
virtual void | Clear () |
Removes all keys and values from this dictionary More... | |
virtual bool | Remove (DataToken key) |
Removes a specific key from this dictionary. Returns true if anything was successfully removed. More... | |
bool | Remove (DataToken key, out DataToken value) |
Removes a specific key from this dictionary. Returns true if anything was successfully removed. If successful, copies the value that was removed into the out DataToken. More... | |
virtual bool | ContainsKey (DataToken key) |
Returns true if the specified key exists on this dictionary. More... | |
virtual bool | ContainsValue (DataToken value) |
Returns true if the specified value exists on this dictionary. More... | |
virtual DataList | GetKeys () |
This is not documented properly yet More... | |
DataList | GetValues () |
This is not documented properly yet More... | |
IEnumerator< KeyValuePair< DataToken, DataToken > > | GetEnumerator () |
This is not documented properly yet More... | |
void | Add (KeyValuePair< DataToken, DataToken > item) |
virtual void | Add (DataToken key, DataToken value) |
Adds the value at the specified key. The entire purpose of this function that sets it apart from SetValue is that an exception will be thrown if the key already exists. This is useful for initialization because it will cause a compile error, but it's not recommended for normal usage where it could cause a runtime error and halt your UdonBehaviour. More... | |
bool | Contains (KeyValuePair< DataToken, DataToken > item) |
void | CopyTo (KeyValuePair< DataToken, DataToken >[] array, int arrayIndex) |
bool | Remove (KeyValuePair< DataToken, DataToken > item) |
Protected Member Functions | |
virtual DataToken | GetValue (DataToken key, out bool success) |
Package Functions | |
virtual void | ParseAll () |
Package Attributes | |
DataList | keyCache |
bool | keysDirty = true |
DataList | valueCache |
bool | valuesDirty = true |
Properties | |
virtual int | Count [get] |
Get the number of elements in the dictionary More... | |
bool | IsReadOnly [get] |
This is not documented properly yet More... | |
DataToken | this[DataToken key] [get, set] |
Private Member Functions | |
IEnumerator IEnumerable. | GetEnumerator () |
Data Dictionaries store Data Tokens by key-value pair, similarly to C# Dictionaries. Most Data Dictionary functions are just wrappers for the underlying C# dictionary, so the C# dictionary documentation also applies if you are looking for more specific details. Both the keys and the values of a Data Dictionary are Data Tokens. This means that you can effectively use anything for your keys. However, if you intend to serialize to VRCJSON, only string keys are supported.
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5401 of file VRCSDK3.cs.
Adds the value at the specified key. The entire purpose of this function that sets it apart from SetValue is that an exception will be thrown if the key already exists. This is useful for initialization because it will cause a compile error, but it's not recommended for normal usage where it could cause a runtime error and halt your UdonBehaviour.
key | The key to set the value at |
value | The value to set |
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5680 of file VRCSDK3.cs.
Definition at line 5660 of file VRCSDK3.cs.
|
virtual |
Removes all keys and values from this dictionary
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5553 of file VRCSDK3.cs.
Definition at line 5693 of file VRCSDK3.cs.
|
virtual |
Returns true if the specified key exists on this dictionary.
key | The key to check for |
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5591 of file VRCSDK3.cs.
|
virtual |
Returns true if the specified value exists on this dictionary.
value | The value to check for |
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5600 of file VRCSDK3.cs.
void VRC.SDK3.Data.DataDictionary.CopyTo | ( | KeyValuePair< DataToken, DataToken >[] | array, |
int | arrayIndex | ||
) |
Definition at line 5710 of file VRCSDK3.cs.
DataDictionary VRC.SDK3.Data.DataDictionary.DeepClone | ( | ) |
Clones the DataDictionary into a new DataDictionary that contains all the same values. Unlike ShallowClone, deep clone means that it will recursively navigate inside each DataList or DataDictionary and copy their contents as well. Items with the TokenType "Reference" will maintain the same reference as the original and not be deep cloned, which includes arrays.
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5527 of file VRCSDK3.cs.
This is not documented properly yet
<incomplete >
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5646 of file VRCSDK3.cs.
|
private |
|
virtual |
This is not documented properly yet
<incomplete >
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5614 of file VRCSDK3.cs.
|
protectedvirtual |
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5493 of file VRCSDK3.cs.
DataList VRC.SDK3.Data.DataDictionary.GetValues | ( | ) |
This is not documented properly yet
<incomplete >
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5629 of file VRCSDK3.cs.
|
packagevirtual |
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5606 of file VRCSDK3.cs.
|
virtual |
Removes a specific key from this dictionary. Returns true if anything was successfully removed.
key | The key to remove |
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5565 of file VRCSDK3.cs.
Removes a specific key from this dictionary. Returns true if anything was successfully removed. If successful, copies the value that was removed into the out DataToken.
key | The key to remove |
value | The value that was removed |
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5578 of file VRCSDK3.cs.
Sets the value at the specified key. If that key does not exist, a new one will be added.
key | The key to set the value at |
value | The value to set |
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Reimplemented in VRC.SDK3.Data.JsonDictionary.
Definition at line 5450 of file VRCSDK3.cs.
DataDictionary VRC.SDK3.Data.DataDictionary.ShallowClone | ( | ) |
Clones the DataDictionary into a new DataDictionary that contains all the same values. Unlike DeepClone, this means that if the DataDictionary contains other DataLists and DataDictionaries, those will still be the same reference.
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5509 of file VRCSDK3.cs.
This is not documented properly yet
<incomplete >
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5487 of file VRCSDK3.cs.
bool VRC.SDK3.Data.DataDictionary.TryGetValue | ( | DataToken | key, |
TokenType | type, | ||
out DataToken | value | ||
) |
This is not documented properly yet
<incomplete >
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5469 of file VRCSDK3.cs.
|
package |
Definition at line 5405 of file VRCSDK3.cs.
|
package |
Definition at line 5407 of file VRCSDK3.cs.
|
package |
Definition at line 5409 of file VRCSDK3.cs.
|
package |
Definition at line 5411 of file VRCSDK3.cs.
|
get |
Get the number of elements in the dictionary
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5417 of file VRCSDK3.cs.
|
get |
This is not documented properly yet
<incomplete >
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 5425 of file VRCSDK3.cs.
Definition at line 5431 of file VRCSDK3.cs.