RoomSharedMemory

This entity represents memory shared between rooms.

# Properties

[{"index":"string Name (ReadOnly)","0":"The name of the shared memory."}]

# Methods

[{"index":"Dictionary, SharedVariableResult> BatchCreateVariableAndWait(Dictionary nameValues) (ServerOnly) (Yield)","0":"Assigns variables with the name and value pairs entered. Returns a table containing variable names and resulting pairs. Script executions are suspended during the operation."}]

[{"index":"void BatchCreateVariableAsync(Dictionary nameValues, func> callbackFunction) (ServerOnly)","0":"Assigns variables with the entered name and value pairs. The function passed as callbackFunction is called with a table containing variable names and result pairs upon completion of the operation."}]

[{"index":"Dictionary, SharedMemoryResultCode> BatchDeleteVariableAndWait(List names) (ServerOnly) (Yield)","0":"Deletes the variables corresponding to the names entered. Returns a table containing variable names and resulting code pairs. Script executions are suspended during the operation."}]

[{"index":"void BatchDeleteVariableAsync(List names, func> callbackFunction) (ServerOnly)","0":"Deletes the variables corresponding to the entered names. The function passed as callbackFunction is called with a table containing variable names and result code pairs upon completion of the operation."}]

[{"index":"Dictionary, SharedVariableResult> BatchGetVariableAndWait(List names) (ServerOnly) (Yield)","0":"Retrieves information pertaining to the variable names entered. Returns a table containing variable names and resulting code pairs. Script executions are suspended during the operation."}]

[{"index":"void BatchGetVariableAsync(List names, func> callbackFunction) (ServerOnly)","0":"Gets the information of the variables corresponding to the entered names. The function passed as callbackFunction is called with a table containing variable names and result pairs upon completion of the operation."}]

[{"index":"Dictionary, SharedVariableResult> BatchSetVariableAndWait(Dictionary nameValues) (ServerOnly) (Yield)","0":"Assigns new variables if there are no variables with the name and value pairs entered. Modifies the values of existing variables if they already exist. Returns a table containing variable names and resulting code pairs. Script executions are suspended during the operation."}]

[{"index":"void BatchSetVariableAsync(Dictionary nameValues, func> callbackFunction) (ServerOnly)","0":"Assigns new variables if there are no variables with the entered name and value pairs. Modifies the values of existing variables if they already exist. The function passed as callbackFunction is called with a table containing variable names and result pairs upon completion of the operation."}]

[{"index":"Dictionary, SharedVariableResult> BatchUpdateVariableAndWait(Dictionary keyValues) (ServerOnly) (Yield)","0":"Modifies the values of variables corresponding to the entered SharedVariableKeyInfo. Does not modify the value if the ETag of SharedVariableKeyInfo is not up to date. Modifies the value unconditionally if ETag is null or an empty string. Returns a table containing variable names and result pairs. Suspends script executions during performance."}]

[{"index":"void BatchUpdateVariableAsync(Dictionary keyValues, func> callbackFunction) (ServerOnly)","0":"Modifies the values of variables corresponding to the entered SharedVariableKeyInfo. Does not modify the value if the ETag of SharedVariableKeyInfo is not up to date. Modifies the value unconditionally if ETag is null or an empty string. The function passed as callbackFunction is called with a table containing variable names and result pairs upon completion of the operation."}]

[{"index":"SharedVariableResult CreateVariableAndWait(string name, string value) (ServerOnly) (Yield)","0":"Assigns a variable. You can see the request result with the returned entity. Suspends script executions during performance."}]

[{"index":"void CreateVariableAsync(string name, string value, func callbackFunction) (ServerOnly)","0":"Assigns a variable. The function passed to the callbackFunction is called with the results upon completion of the operation."}]

[{"index":"SharedMemoryResultCode DeleteVariableAndWait(string name) (ServerOnly) (Yield)","0":"Deletes the variable. Suspends script executions during performance."}]

[{"index":"void DeleteVariableAsync(string name, func callbackFunction) (ServerOnly)","0":"Deletes the variable. The function passed to the callbackFunction is called with the result codes upon completion of the operation."}]

[{"index":"SharedVariableResult GetVariableAndWait(string name) (ServerOnly) (Yield)","0":"Gets variable information. Suspends script executions during performance."}]

[{"index":"void GetVariableAsync(string name, func callbackFunction) (ServerOnly)","0":"Gets variable information. The function passed to the callbackFunction is called with the result codes and variable information upon completion of the operation."}]

[{"index":"SharedVariableResult SetVariableAndWait(string name, string value) (ServerOnly) (Yield)","0":"Assigns new variables if there are no variables. Modifies the values of existing variables if they already exist. You can see the request result with the returned entity. Suspends script executions during performance."}]

[{"index":"void SetVariableAsync(string name, string value, func callbackFunction) (ServerOnly)","0":"Assigns new variables if there are no variables. Modifies the values of existing variables if they already exist. The function passed to the callbackFunction is called with the results upon completion of the operation."}]

[{"index":"SharedVariableResult UpdateVariableAndWait(SharedVariableKeyInfo keyInfo, string value) (ServerOnly) (Yield)","0":"Modifies variable values. Does not modify the value if the ETag of keyInfo is not up to date. Modifies the value unconditionally if the ETag is a nill or empty string. Suspends script executions during performance."}]

[{"index":"void UpdateVariableAsync(SharedVariableKeyInfo keyInfo, string value, func callbackFunction) (ServerOnly)","0":"Modifies variable values. Does not modify the value if the ETag of keyInfo is not up to date. Modifies the value unconditionally if the ETag is a nill or empty string. The function passed to the callbackFunction is called with the result codes and latest variable information upon completion of the operation."}]

# Limitations

When using RoomSharedMemory, please keep the following limitations in mind.

#### Naming Rules

RoomSharedMemory and shared variable names can only use the following characters. They must be at least 1 character and can be up to 100 characters.

  * Upper and lower case letters
  * Numbers
  * Spaces
  * _, , -



#### Quantity and Size Limits

  * You can create up to 100 RoomSharedMemory for each world.
  * Each shared variable can save up to 80,000 bytes.
  * Each shared memory can't exceed 80MiB in capacity.
  * The event property that will be sent can't exceed 80,000 bytes in capacity.