Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
GameAPI.Resources Class Reference

Class containing methods related to accessing resources. More...

Public Member Functions

Get< T > (string location)
 Retrieves a resource of the specified type from the given location relative to your game's root directory. The location should not include the file's extension. More...
 
IEnumerable< string > FindAll< T > (bool recursive, string rootLocation=null)
 Retrieves the locations of all resources of the given type within the directory specified by rootLocation . Can optionally recurse into subdirectories. Specify null for rootLocation to search from the game's root directory. More...
 

Static Public Member Functions

static string[] SplitLocation (string location)
 Splits a location string by the path separating character '/'. Empty subpaths are ignored. More...
 

Detailed Description

Class containing methods related to accessing resources.

Member Function Documentation

IEnumerable<string> GameAPI.Resources.FindAll< T > ( bool  recursive,
string  rootLocation = null 
)
inline

Retrieves the locations of all resources of the given type within the directory specified by rootLocation . Can optionally recurse into subdirectories. Specify null for rootLocation to search from the game's root directory.

Template Parameters
TType of the resources to find.
Parameters
recursiveIf true, subdirectories of the root location are searched too.
rootLocationDirectory to search from.
T GameAPI.Resources.Get< T > ( string  location)
inline

Retrieves a resource of the specified type from the given location relative to your game's root directory. The location should not include the file's extension.

Template Parameters
TType of the resource to retrieve.
Parameters
locationPath to the resource.
static string [] GameAPI.Resources.SplitLocation ( string  location)
inlinestatic

Splits a location string by the path separating character '/'. Empty subpaths are ignored.

Parameters
locationLocation string to split.