LuaScript Xojo Plugin |

# LuaScriptContext.SetGlobal Method

Sets a global Xojo or Real Studio object variable.

SetGlobal(
name as String,
value as Object)

#### Parameters

name
  Name of the variable to be set
value
  Value of the variable to be set

#### Remarks

Note that the Lua script plugin will keep reference to the passed in REALbasic object until the LuaScript object is terminated. This is done to ensure that objects that are passed to Lua do not get terminated while Lua might still be using them.

#### See Also

LuaScriptContext Class