Best practice for migrating scripts to plugin?

I’m interested in moving scripts in my project to a plugin. I can easily create a managed plugin with Visual Studio and import it through the Editor. And, I can easily move the script assets out of my project to be part of that plugin. The problem is that all the assets that used those scripts are still referencing the old asset location, and I’d like them to reference them from the plugin.

Is there a good/easy way to change references of a script (project wide) to another reference, AND retain all the field values?

In a perfect world, I’d like to be able to create an assembly asset in the Editor and move scripts in and out of it at will the same way they can be moved around in the file system.

Thanks.

Short of creating a fairly robust find and replace script, you could instead create a wrapper class for your new assets with the same name as the old one. With properties for the variables and methods that redirected to your new location you could avoid the hassle of having to rewrite everything. If you have code that needs really high performance though I would just suggest biting the bullet.