Objects

Functions

GetClass (UClass)

Gets a class object for the supplied class.

Expensive Function

This searches a list of thousands of objects, which can be expensive so do not use regularly.

Parameters

  1. Package (String)

  2. Class Name (String)

Example

local AShip = GetClass('Athena', 'Ship')

GetStruct (UScriptStruct)

Gets a UScriptStruct object for the supplied struct.

Expensive Function

This searches a list of thousands of objects, which can be expensive so do not use regularly.

Parameters

  1. Package (String)

  2. Struct Name (String)

Example

local FVector = GetStruct('CoreUObject', 'Vector')

GetObject (UObject)

Finds the first instance of an object. Use an SDK to find things.

Expensive Function

This searches a list of thousands of objects, which can be expensive so do not use regularly. Also do not use to get instances of UClass or UScriptStruct! Use the aforementioned functions instead.

Parameters

  1. Object Full Name (String)

Example

local defaultObject = GetObject('NetConnection Engine.Default__NetConnection')

LoadAsset (UObject)

Load an object from a PAK. Primarily used for loading Blueprint classes that are normally otherwise garbage collected/not always loaded. You're also able to load assets such as materials or textures as well.

Expensive Function

This loads assets directly from a path, from a PAK, which is expensive and not to be used regularly.

Parameters

  1. Asset Path (String)

  2. Object Name (String)

Example

-- Load the keg base class so we can use later to identify kegs
local GunpowderBarrelProxy = LoadAsset('/Game/Blueprints/GameObjects/Items/MerchantCrates/bp_merchantcrate_gunpowderbarrelproxy', 'BP_MerchantCrate_GunpowderBarrelProxy_C')

Last updated