Description
The UseAbsoluteSourcePaths
property is a boolean flag within the Sandbox.Compiler
class. It determines whether absolute source paths are used during the development process. Using absolute paths can enhance debugging by providing precise file locations. However, in a packed or release build, it is advisable to use relative paths to prevent exposing the builder's file system structure.
Usage
To use the UseAbsoluteSourcePaths
property, you can access it directly from an instance of the Sandbox.Compiler
class. Set it to true
during development to facilitate debugging, and set it to false
for release builds to maintain file system privacy.
Example
// Example of setting the UseAbsoluteSourcePaths property
// Create an instance of the Compiler class
Sandbox.Compiler compiler = new Sandbox.Compiler();
// Enable absolute source paths for development
compiler.UseAbsoluteSourcePaths = true;
// Later, disable absolute source paths for release
compiler.UseAbsoluteSourcePaths = false;