Arcade Shooter
Public Member Functions | List of all members
KatanaEngine::ResourceManager Class Reference

Loads and manages the lifespan of objects from external files. More...

#include <ResourceManager.h>

Public Member Functions

void SetContentPath (const std::string &path)
 Sets the location of the folder where game resources are stored. More...
 
void UnloadAllResources ()
 Unloads all game resources.
 
template<typename T >
TLoad (const std::string &path, const bool cache=true, const bool appendContentPath=true)
 Load and manage a resource. More...
 

Detailed Description

Loads and manages the lifespan of objects from external files.

Member Function Documentation

◆ Load()

template<typename T >
T* KatanaEngine::ResourceManager::Load ( const std::string &  path,
const bool  cache = true,
const bool  appendContentPath = true 
)
inline

Load and manage a resource.

Parameters
pathThe path to the resource.
cacheSets whether the resource manager will manage the resource.
appendContentPathAllows the use of shorter paths when loading assets.
Remarks
Usually a game's content is kept in a single folder which is set by calling SetContentPath. This allows you to use shorter paths when loading assets. Occasionally a resource is outside of this folder and not using the content path is more convenient.

◆ SetContentPath()

void KatanaEngine::ResourceManager::SetContentPath ( const std::string &  path)
inline

Sets the location of the folder where game resources are stored.

Parameters
pathThe file path to the content folder.

The documentation for this class was generated from the following file: