The resource type represents a game resource file.
A resource literal must adhere to the pattern R"<ResourceName>". The <ResourceName> element must adhere to the pattern <ResRef>.<ResType> and can be no more than 32 characters including the ".". The <ResRef> and <ResType> elements must only contain lower case letters, numbers, and/or underscores.
// valid resource literals resource rLiteral1 = R"abomination.utc"; // a creature resource literal resource rLiteral2 = R"it_some_ale.uti"; // an item resource literal // invalid resource literals resource rInvalid1 = "no_prefix_literal.uti"; // causes "Mismatch types" error resource rInvalid2 = R"no_extension_literal"; // causes "Unknown error" error resource rInvalid3 = R"too__many__characters__literal.uti"; // causes "Unknown error" error
There are no native functions that can be used to convert another data type to a resource.
The following functions can be used to convert a resource to another data type:
There is no implicit conversion to a resource.
The following functions allow a resource to exist outside of the scope of the current script by storing it on an object or event:
The following functions allow a resource which exist outside of the scope of the current script to be used in the current script by retrieving it from an object or event: