// onProjectChanged fires when the user switches projects (open / new), // so this is where to (re)hydrate any per-project state. this.connections.push( model.onProjectChanged.connect(() => { console.log('Switched projects — reloading data'); }) );
// Watch for new SceneObject additions this.connections.push( model.project.onEntityAdded('SceneObject').connect((entity: Editor.Model.Entity) => { console.log('SceneObject added:', entity); }) );
console.log('CoreService started, listening for project and entity changes');
Base class and module for creating background plugin services in Lens Studio.
Example