WorldInstanceSharedMemory

This is the memory shared by WorldInstance.

# 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 variables corresponding to the names entered. Even if the variable is being used somewhere, it will be deleted. Returns a table containing variable names and resulting code pairs. Suspends script executions during the operation."}]

[{"index":"void BatchDeleteVariableAsync(List names, func> callbackFunction) (ServerOnly)","0":"Deletes the variables corresponding to the entered names. Even if the variable is being used somewhere, it will be deleted. 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, SharedMemoryResultCode> BatchReleaseVariableAndWait(List names) (ServerOnly) (Yield)","0":"Deletes variables corresponding to the names entered. If the variable is no longer used, it is deleted automatically. Returns a table containing variable names and resulting code pairs. Suspends script executions during the operation."}]

[{"index":"void BatchReleaseVariableAsync(List names, func> callbackFunction) (ServerOnly)","0":"Ends the use of variables corresponding to the entered names. If the variable is no longer used, it is deleted automatically. 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> 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. 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. Even if the variable is being used somewhere, it will be deleted. Suspends script executions during performance."}]

[{"index":"void DeleteVariableAsync(string name, func callbackFunction) (ServerOnly)","0":"Deletes the variable. Even if the variable is being used somewhere, it will be deleted. 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":"SharedMemoryResultCode ReleaseVariableAndWait(string name) (ServerOnly) (Yield)","0":"Finishes using the variable. If the variable is no longer used, it is deleted automatically. Suspends script executions during performance."}]

[{"index":"void ReleaseVariableAsync(string name, func callbackFunction) (ServerOnly)","0":"Finishes using the variable. If the variable is no longer used, it is deleted automatically. The function passed to the callbackFunction is called with the result codes 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. 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 ETag is null or an 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 WorldInstanceService please keep the following limitations in mind.

#### Naming Rules

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



#### Use Amount Limit

  * The max number of calls per minute for the WorldInstanceSharedMemory function is 1,000 for all of the world instances created in a world. 
    * If the value of 100 shared variables is changed with a single Batch function call, the function call count is 100.
    * If 100 calls are made at the same time across 10 world instances, the call count is 1,000.
  * The max number of event send counts between world instances is 1,000 per minute.