Click or drag to resize

ResourceManagerLoadT Method (ResourceFolder, String, Boolean, Boolean)

Load and cache a resource.

If folder is Resources the asset is loaded with Resources.Load. If it's not, it's parsed manually with the list of parsers registered.

Namespace:  Kit
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0
Syntax
C#
public static T Load<T>(
	ResourceFolder folder,
	string file,
	bool modded = true,
	bool merge = false
)
Request Example View Source

Parameters

folder
Type: KitResourceFolder
The folder to load the resource from.
file
Type: SystemString
The path and file-name relative to the folder.
modded (Optional)
Type: SystemBoolean
Whether to allow mods to load their version of the asset instead. Useful if you want to allow some assets to be modded, but not others. Has no effect if MODDING is not defined.
merge (Optional)
Type: SystemBoolean
Whether to merge the game version and all mod versions of the asset. Useful to allow modding of configuration files. Has no effect if MODDING is not defined or modded is false.

Type Parameters

T
Type of the resource expected.

Return Value

Type: T
Reference to the resource, or if it was not found.
See Also