playcanvas / editor

Issue tracker for the PlayCanvas Editor
https://playcanvas.com/
160 stars 28 forks source link

Unable to use scripts created in Code Editor #1129

Open LeXXik opened 8 months ago

LeXXik commented 8 months ago
  1. Open Code Editor
  2. Create a script
  3. Try to attach it to entity in Editor

Expected: the script is shown in the list of available scripts Actual: the script is missing

No errors in console.

https://github.com/playcanvas/editor/assets/5677782/07bbc51d-650b-4a23-acc3-0c4d06f6ccfa

LeXXik commented 8 months ago

Probably related: #1079

mvaligursky commented 8 months ago

Thanks, urgently investigating.

LeXXik commented 8 months ago

Some notes:

marklundin commented 8 months ago

Thanks for flagging this @LeXXik, we'll be pushing a fix for this in the next release

marklundin commented 7 months ago

Fixed and deployed

ideathingdev commented 1 week ago

This is happening again on 1.74.0. Parsing doesn't help

willeastcott commented 1 week ago

Yes, if you create the script in the Code Editor, it does not auto-parse. But if you create the script in the main Editor's Assets panel, it does auto-parse. @marklundin, please take a look.

Maksims commented 1 week ago

Also, due to delay of scripts parsing (it takes time from the moment of creating script asset till it is parsed), please add progress (like assets with pipeline jobs) onto the asset to indicate it is awaiting parsing finish. And select an asset immediately, not with delay. As it is very annoying when selecting an entity to add script, then creating a script and 2-4 seconds after, Editor changes selection, while you already in the middle of something else.

marklundin commented 1 week ago

This was working, but looks like the parseScriptCallback was removed, so no new scripts are parsed in the code-editor. @kpal81xd was this supposed to be set elsewhere?