playcanvas / playcanvas/editor
Moving a Script Type from one code file to another reverts entity attributes with that type to default values
Open
Nobody has claimed this yet.
area: scripts
bug
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 215
- Avg merge
- 1d 29m
- Merged PRs (30d)
- 30
Description
Steps to reproduce;
- Add a scripttype (testA.js) with an attribute
- Add the scripttype to an entity and change the default value
- Move code from testA.js to a new file testB.js
- Parse testA.js and testB.js
- Values on the entity are reverted to default
While generally not an issue, it can cause problems when refactoring, especially for webpack/typescript workflows where they may split the built script to several files to make parsing more manageable in the editor
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.