LoadResource

Definition

LoadResource(string resourceDirectoryName, string resourceFileName)

Description

This function loads the resource resourceFileName located in the resourceDirectoryName folder. In order for this function to load the desired resource, you must first add it through the Add Resource to Current Project dialog (File > Project > Add/Remove Resource to/from Current Project). You can go to the Project Resources section through the Script Utility dialog (Tools > Script Editor > Tools > Script Utility) and copy the names of the resources.

Parameters

resourceDirectoryName
Specifies the name of the folder where resourceFileName is located.

resourceFileName
Specifies the name of the resource file.

Example

function Init()
    LoadResource("Images""Cursor.dds")
    ShowCursorIcon("Images_Cursor.dds", 5.0)
end

function Update()

end
First, using the LoadResource function, we load the “Cursor.dds” file located in the “Images” folder. Then we display it using the ShowCursorIcon function.
adminLoadResource