The AssetsDirectory
property provides access to the directory that houses the assets for the current addon. This property is part of the ProjectConfig
class within the Sandbox.DataModel
namespace.
The AssetsDirectory
property provides access to the directory that houses the assets for the current addon. This property is part of the ProjectConfig
class within the Sandbox.DataModel
namespace.
Use the AssetsDirectory
property to retrieve the directory information for the assets associated with a specific addon. This property is marked with the JsonIgnore
and Hide
attributes, indicating that it is not intended to be serialized to JSON and may be hidden from certain UI elements.
// Example of accessing the AssetsDirectory property var projectConfig = new ProjectConfig(); DirectoryInfo assetsDir = projectConfig.AssetsDirectory; // Use the assetsDir to perform operations like listing files if (assetsDir.Exists) { var files = assetsDir.GetFiles(); foreach (var file in files) { // Process each file } }