Script parser error
Getting an error in Editor, when trying to attach a new script to an entity:
- Add a script component to entity.
- Click the script selection and select new script to make
- Enter a new script name and wait for it to be created and added to script component
Actual:
The script gets created, but does not get added to the component. Editor console has an error:
Edit: Even though the script does get created, it does not appear in the script selection of the script component. Refreshing the browser does not fix it and there are no additional logs in the console.
Edit: Private project: https://playcanvas.com/project/1164601 Entity: Stress Test Script: stress-test.js
Edit: Forked the project. The script file is missing from the list as well. After parsing it, it appeared in the script component selection list. The original project should still be missing it.
Edit: Creating a new script works fine in blank project. Only this project has an issue. Forked project also throws the above error, when trying to create a new script from the script component.
I tried this on a new project, and it works there.
Is this issues still happening @LeXXik? Can you make that project public, I can't access it
It kind of does. If I create a new script in that project, then the script component can see it. But the old one is still missing:
I thought you should be able to add yourself to private projects given you are a super user? :) I can add you, what's your username?
Could as well be that the error is gone and the script is simply missing, because there was some error at the time it was created.