Same Unity project referencing same .ts file's generated .cs file not updating when changing project

Using the same Unity project I have a customised OrbitControls script I use in a lot of scenes called OrbitControlsEPM. I have some public variables on it which are set in Unity inspector and serialized. I have multiple Needle projects in this Unity project and each one has a different copy of OrbitControlsEPM.ts. I notice when switching between scenes to change project, that script’s local project version isn’t always used. I think this may have something to do with some copies of the script using public serialized variables set in Unity inspector, and some others use private variables in their script only. Either way the inspector sometimes shows the wrong version of the script, not the local project version of the script and it won’t update until I change something in the local copy of the script and save it like adding a ‘//’ for a quick comment and saving

Original Post on Discord

by user 103054507105067008

This is a typical case where you really want to use a NpmDef and reference that from your various projects

Wouldn’t recommend keeping N copies of the same script.
To resolve your concrete problem here you may have to restart the server

I’ll have to get up to scratch with NPM defs after this project to avoid this issue in future

by user 103054507105067008