UScriptStruct
Inheritance
Metamethods
__index
Usage:
UScriptStruct["StructMemberName"]orUScriptStruct.StructMemberNameReturn type:
autoReturns the value for the supplied member name.
Can return any type, you can use the
type()function on the returned value to figure out what Lua class it's using (if non-trivial type).Example:
lua
local scriptStruct = FindFirstOf('_UI_Items_C')
-- Either of the following can be used:
local item = scriptStruct['Item']
local item = scriptStruct.Item__newindex
Usage:
UScriptStruct["StructMemberName"] = NewValueorUScriptStruct.StructMemberName = NewValueAttempts to set the value for the supplied member name to
NewValue.Example:
lua
local scriptStruct = FindFirstOf('_UI_Items_C')
-- Either of the following can be used:
scriptStruct['Item'] = 5
scriptStruct.Item = 5Methods
GetBaseAddress()
- Return type:
integer - Returns: the address in memory where the
UObjectthat thisUScriptStructbelongs to is located
GetStructAddress()
- Return type:
integer - Returns: the address in memory where this
UScriptStructis located
GetPropertyAddress()
- Return type:
integer - Returns: the address in memory where the corresponding
UProperty/FPropertyis located
IsValid()
- Return type:
bool - Returns: whether the struct is valid
IsMappedToObject()
- Return type:
bool - Returns: whether the base object is valid
IsMappedToProperty()
- Return type:
bool - Returns: whether the property is valid
type()
- Return type:
string - Returns: "UScriptStruct"
小莫的维基库