Preparing search index...

    Version information for the editor or plugin.

        // Editor.Version is a read-only {major, minor, patch} struct returned
    // by editor APIs — most commonly Asset.maxLsVersion (max Lens Studio
    // version an Asset Library asset was published for).
    //
    // It is NOT the same as `LensStudio:App.version` — App.version is a
    // plain string ("5.21.0") and reflects the running Lens Studio binary.
    // Editor.Version is a structured value attached to assets/metadata.
    //
    // To *set* a version on a Script Asset, use the sibling class
    // Editor.Assets.Version (public ctor):
    // scriptAsset.version = new Editor.Assets.Version(1, 2, 3);
    const provider = this.pluginSystem.findInterface(
    IAssetLibraryProvider.interfaceId
    ) as import('LensStudio:AssetLibrary').IAssetLibraryProvider;

    const env = new EnvironmentSetting();
    env.environment = Environment.Production;
    env.space = Space.Public;
    const filter = new AssetFilter();
    filter.searchText = 'material';

    const resp = await provider.assetService.fetchAsync(
    new AssetListRequest(env, filter)
    );
    if (resp.ok && resp.data && resp.data.assets[0]) {
    const v = resp.data.assets[0].maxLsVersion; // Editor.Version
    console.log(`max LS: ${v.major}.${v.minor}.${v.patch}`);
    }
    Index

    Constructors

    Properties

    Constructors

    Properties

    major: number

    Major version number.

    minor: number

    Minor version number.

    patch: number

    Patch version number.