[SOLVED] PlayCanvas does not 'see' renamed scripts

As part of a refactoring I changed some script names (file name, script name and the object name).
But when removing the script from components and trying to add the new one, there are still only the old scripts available. I can not select the new ones. And changes to the script to not work, so it is also using some cached (old) scripts.
How can I make Playcanvas sees my new (renamed) scripts?

Hi @simmania,

When you make change to the script type and its attributes, you are required to reparse the script asset. That way the editor will receive the update signature.

Select your asset and click PARSE on the inspector window:

I did, but that doesn’t work.
The strange thing is that when I look at the debuger I see the new file name. But when looking in that file, it is the old code! While when looking in the file in the PlayCanvas editor, I see the new code.

@simmania Would you be able to provide a link to the project to look at or maybe the first lines of each script and a picture of the file list in your editor?

I symplified the project a bit. This is the link: https://playcanvas.com/project/1024081/settings

There was a script orbit-keyboard-input.js that was attached to the Camera.
Then I renamed the script file to new-orbit-keyboard-input.js and addapted the content accordingly.
But now the old script file is still attached to the camera. When deleting it and trying to add the new one, the new one does not appear on the list. But the old one does!

@simmania I think your project may be private. Could you double check and if not make public so the group can have a look?

I copied it and made it public:

@simmania Sorry but I only see your build running in the browser. Is there a similar link to your copied project as seen in editor?

Sorry for that.
I guess this is the correct link:
https://playcanvas.com/project/1024172/overview/eptcopy

@simmania OK so here is what I found. Go to your Camera and you should see the following. If you don’t see this it is probably that you did not refresh script and project.

Delete orbitKeyboardInput since it is no longer there.
Then refresh project and then try drop down.

What do you mean with ‘reset project’?
When I quit the project and open it again, it stil has the old name.

@simmania I usually just to be sure everything is in a good state I go to the browser refresh and do so. So in your project do you delete it first? Hit the trash can next to orbitTouchInput? Then click on the script selection above it and it should appear.

Thx for helping, but it did not work out for me.
But I could solve it by creating a complete new script, copy past all new stuff into the script and then attach this new script.
So my conclusion is:
Never change a script file name (and object name inside script) when it is attached to some entity.