// Ask user for the file they want to use as image marker import*asUifrom'LensStudio:Ui'; constgui = pluginSystem.findInterface(Ui.IGui); constfilename = gui.dialogs.selectFileToOpen({ 'caption':'Select image for the marker', 'filter':'*.png *.jpeg *.jpg' }, '')
// Import the image, and use it as the marker's texture constimportedTextureMeta = awaitassetManager.importExternalFileAsync(filename, destination, Editor.Model.ResultType.Auto); imageMarker.texture = importedTextureMeta.primary;
A "Lens Scripting".Built-In.MarkerAsset for use with Editor.Components.MarkerTrackingComponent
Example