Enum identifying the root directory context for resolving source paths within a Lens Studio project.
Example
// SourceRootDirectory is passed to SourcePath's constructor to anchor a // relative path either under the project's Assets folder or under the // Packages folder. AssetManager uses the resulting SourcePath as a // destination for imports, renames, etc. constmodel = this.pluginSystem.findInterface(Editor.Model.IModel) asEditor.Model.IModel; constassetManager = model.project.assetManager;
// "Assets/Materials" — a location inside the project Assets root. constassetsDest = newEditor.Model.SourcePath( newEditor.Path('Materials'), Editor.Model.SourceRootDirectory.Assets );
// Create a native Material asset under Assets/Materials. constcreated = assetManager.createNativeAsset('Material', 'DocsSample', assetsDest); console.log(`Created ${created.name} under ${assetsDest.toString()}`);
Enum identifying the root directory context for resolving source paths within a Lens Studio project.
Example