Script Library Management
You can take advantage of the library management features for script assets for cross team collaboration.
Registering Scripts to Installed Library
To register your script to your library, right click on the script asset > register to library. The script asset will be registered to your installed library in the Library Components folder.
When you register at your library, you will see a .lsc file, a .json file that contains information about the script asset and an icon file.
We append a unique id to the name of the script, this allows having multiple scripts with the same name in your installed library.
Installed Library
All installed Custom Components are saved in the path set in the Installed Content Preferences.
Versioning
Registered scripts have a version number associated with them to help manage updates without breaking existing projects.
The version installed to your Lens Studio or inside an Installed Library can be updated by right clicking the script and selecting Push Update To Library or setting the version in the script asset inspector.
Push Update to Library > Locked, this will prevent any future edits to the script Push Update to Library > Editable, this will allow any future editors to the script
When your installed library has an updated version of the script compared to your project you can update your script by right clicking the script and selecting Pull Update from Library.
Script Library Management through Teams
Script library management enables team members to work efficiently together. If team members share the same installed library through a git workflow, they can easily share their changes to their scripts.
For Example: A team sets their library path to be /UserId/myScripts. myScripts, is a git repository of script assets. When a user sets it as their library path, all the script assets will show up in the preferences window under Lens Studio Installed Content.
Or they’ll show up under Library Components in the Add New Asset Menu.
Team member A, decided they wanted to update ScriptA and pushed the update to their library. Now they can commit the change on git and push it to their repo.
Team member B, who is working on a project with an old version of Script A, can update their git repo. Now their installed library will have the most recent version of Script A. In their project, they can right click on ScriptA and click Pull Update from the Library.