Salmon Engine/Path to resources

From Fish Run Games SDK
Jump to: navigation, search

On application init you should tell the resource manager where resources can be found. That's why you should always give path to resources before resources starts to load. It is simple – just set up string ST::PathToResources, for example Windows mark.png:

ST::PathToResources = "../../assets/";

Now all resources will be loaded from directory set.

Typical values for all platforms given here:

#ifdef TARGET_ANDROID
	ST::PathToResources = "";
#endif
#ifdef TARGET_WIN32
#ifdef DEBUG
	ST::PathToResources = "../../assets/";
#else
	ST::PathToResources = "res/";
#endif
#endif
#ifdef TARGET_IOS
	ST::PathToResources = "assets/";
#endif
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox