playcanvas / playcanvas/editor

Moving a Script Type from one code file to another reverts entity attributes with that type to default values

Open
#396 7 comments 0 reactions 1 assignee View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.