VRC SDK
This project aims to completely document the VRChat Unity SDK
Loading...
Searching...
No Matches
VRC.SDK3.Data.DataDictionary Class Reference

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...

Inheritance diagram for VRC.SDK3.Data.DataDictionary:
Collaboration diagram for VRC.SDK3.Data.DataDictionary:

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 ()
 

Detailed Description

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.

Member Function Documentation

◆ Add() [1/2]

virtual void VRC.SDK3.Data.DataDictionary.Add ( DataToken  key,
DataToken  value 
)
virtual

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.

Parameters
keyThe key to set the value at
valueThe 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.

◆ Add() [2/2]

void VRC.SDK3.Data.DataDictionary.Add ( KeyValuePair< DataToken, DataToken item)

Definition at line 5660 of file VRCSDK3.cs.

◆ Clear()

virtual void VRC.SDK3.Data.DataDictionary.Clear ( )
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.

◆ Contains()

bool VRC.SDK3.Data.DataDictionary.Contains ( KeyValuePair< DataToken, DataToken item)

Definition at line 5693 of file VRCSDK3.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ContainsKey()

virtual bool VRC.SDK3.Data.DataDictionary.ContainsKey ( DataToken  key)
virtual

Returns true if the specified key exists on this dictionary.

Parameters
keyThe 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.

◆ ContainsValue()

virtual bool VRC.SDK3.Data.DataDictionary.ContainsValue ( DataToken  value)
virtual

Returns true if the specified value exists on this dictionary.

Parameters
valueThe 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.

Here is the call graph for this function:

◆ CopyTo()

void VRC.SDK3.Data.DataDictionary.CopyTo ( KeyValuePair< DataToken, DataToken >[]  array,
int  arrayIndex 
)

Definition at line 5710 of file VRCSDK3.cs.

◆ DeepClone()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEnumerator() [1/2]

IEnumerator< KeyValuePair< DataToken, DataToken > > VRC.SDK3.Data.DataDictionary.GetEnumerator ( )

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEnumerator() [2/2]

IEnumerator IEnumerable. VRC.SDK3.Data.DataDictionary.GetEnumerator ( )
private

Definition at line 5654 of file VRCSDK3.cs.

Here is the call graph for this function:

◆ GetKeys()

virtual DataList VRC.SDK3.Data.DataDictionary.GetKeys ( )
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.

Here is the caller graph for this function:

◆ GetValue()

virtual DataToken VRC.SDK3.Data.DataDictionary.GetValue ( DataToken  key,
out bool  success 
)
protectedvirtual

Reimplemented in VRC.SDK3.Data.JsonDictionary.

Definition at line 5493 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ GetValues()

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.

Here is the call graph for this function:

◆ ParseAll()

virtual void VRC.SDK3.Data.DataDictionary.ParseAll ( )
packagevirtual

Reimplemented in VRC.SDK3.Data.JsonDictionary.

Definition at line 5606 of file VRCSDK3.cs.

Here is the caller graph for this function:

◆ Remove() [1/3]

virtual bool VRC.SDK3.Data.DataDictionary.Remove ( DataToken  key)
virtual

Removes a specific key from this dictionary. Returns true if anything was successfully removed.

Parameters
keyThe 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.

Here is the caller graph for this function:

◆ Remove() [2/3]

bool VRC.SDK3.Data.DataDictionary.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.

Parameters
keyThe key to remove
valueThe 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.

Here is the call graph for this function:

◆ Remove() [3/3]

bool VRC.SDK3.Data.DataDictionary.Remove ( KeyValuePair< DataToken, DataToken item)

Definition at line 5717 of file VRCSDK3.cs.

Here is the call graph for this function:

◆ SetValue()

virtual void VRC.SDK3.Data.DataDictionary.SetValue ( DataToken  key,
DataToken  value 
)
virtual

Sets the value at the specified key. If that key does not exist, a new one will be added.

Parameters
keyThe key to set the value at
valueThe 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.

◆ ShallowClone()

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.

Here is the call graph for this function:

◆ TryGetValue() [1/2]

bool VRC.SDK3.Data.DataDictionary.TryGetValue ( DataToken  key,
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 5487 of file VRCSDK3.cs.

Here is the call graph for this function:

◆ TryGetValue() [2/2]

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.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ keyCache

DataList VRC.SDK3.Data.DataDictionary.keyCache
package

Definition at line 5405 of file VRCSDK3.cs.

◆ keysDirty

bool VRC.SDK3.Data.DataDictionary.keysDirty = true
package

Definition at line 5407 of file VRCSDK3.cs.

◆ valueCache

DataList VRC.SDK3.Data.DataDictionary.valueCache
package

Definition at line 5409 of file VRCSDK3.cs.

◆ valuesDirty

bool VRC.SDK3.Data.DataDictionary.valuesDirty = true
package

Definition at line 5411 of file VRCSDK3.cs.

Property Documentation

◆ Count

virtual int VRC.SDK3.Data.DataDictionary.Count
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.

◆ IsReadOnly

bool VRC.SDK3.Data.DataDictionary.IsReadOnly
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.

◆ this[DataToken key]

DataToken VRC.SDK3.Data.DataDictionary.this[DataToken key]
getset

Definition at line 5431 of file VRCSDK3.cs.


The documentation for this class was generated from the following file: