Platform parameters
- Last UpdatedNov 19, 2024
- 3 minute read
This topic describes Platform parameters for the config.xml application configuration file.
Platform
The platform section contains a set of parameters that are used to customize application loading and initial setup.
Sound devices
Sometimes, a system may host more sound channels. A machine can have both speakers and headphones and VR devices, such Oculus and Vive, that have integrated audio devices. In order to have audio play on the correct device, you need to use the sound.device parameter. The default value -1 assigns the audio to the windows default device. However, the default value does not work every time and even the default device can change when plugging different devices. In these cases, you should use the assigned device channel ID. In order to find the ID, start the application and then look at its log file. The audio devices are listed at the beginning of the file with their number IDs.
If a system has no sound channels, the sound.enable setting will automatically switch to false during initialization and the error will be reported on the log. It's recommended to update the setting in the file itself to remove the error.
Texture Dirs
The dirs.textures setting defines a list of folders that can contain texture contents. When the engine looks for a texture content, it searches folder by folder following the list order. If you want to override a texture (even after deploy), you need to place another version of the texture in a folder that comes earlier in the list.
Platform parameters
This is a list of Platform parameters for the config.xml application configuration file.
|
Attribute |
Type |
Support for Windows platform |
Support for Portable platforms |
Description |
|---|---|---|---|---|
|
sound |
Yes |
No |
||
|
enable |
sbool |
Yes |
No |
Enable sounds/music effects. If set to False, no audio device is linked despite the sound.device value. Disabling audio can be necessary to run on devices that offer no audio device. |
|
device |
sint |
Yes |
No |
This parameter defines which audio device to use to play sound among the available ones. Set -1 to use windows default device. Check application log file to look for devices and their number id. |
|
dirs |
Yes |
Yes |
These sections define the folders to be used to load the different types of application contents. |
|
|
textures |
sstring |
Yes |
Yes |
Textures directories (comma separated). The order of the list defines the priority. If a file is present in more than one folder, it is taken from the folder that comes first in the list. This is used sometimes to override PAKed contents. |
|
models |
sstring |
Yes |
Yes |
The Models directory. |
|
movies |
sstring |
Yes |
No |
The Movies directory. |
|
scripts |
sstring |
Yes |
No |
The Scripts directory. |
|
shaders |
sstring |
Yes |
No |
The Shaders directory. |
|
streams |
sstring |
Yes |
No |
The Music Streams directory. |
|
sounds |
sstring |
Yes |
Yes |
The Sounds directory. |
|
cache |
sstring |
Yes |
No |
The Cache system directory. |
|
plugins |
sstring |
Yes |
No |
The Plugins directory. Can be set to local or absolute path. |
|
probes |
sstring |
Yes |
No |
The Probes directory. |
|
usershaders |
Yes |
Yes |
||
|
fileSystem |
Yes |
No |
This section is used to customize data file loading. |
|
|
enablePAKFilesPreload |
sbool |
Yes |
No |
Enables preload in memory of the files included in PAK when accessed. |
|
mapMinimumSizeKB |
int |
Yes |
No |
Minimum size of a file to be opened with a Map function (both for PAK and standard files). |
|
enableDataAccessRestrictions |
sbool |
Yes |
No |
Enables prevention of path traversal on file loading when using the FileManager. |
|
contentFolderWhiteList |
sstring |
Yes |
No |
Root folders list where content can be loaded in addition to working folder, when data restriction is enable. |
|
target |
sstring |
Yes |
No |
Sets the target platform for the system.platform (win64, win64_cloud, win64_nx, ios_nx, android_nx, hololens2_nx). |
