defold / defold/defold

Editor aggressively deletes your game data from collections when you temporarily create a code error

Open
#9,682 4 comments 5 reactions 0 assignees View on GitHub
editor go_property task
Dominant language
C++
Stars
6.3k
Forks
455
Avg merge
2d 2h
Merged PRs (30d)
129

Description

**Describe the bug**

The editor silently edits project files that are not open, removing overridden `component_property` values, when a code error in an externally edited script is discovered during an attempted build.

**To Reproduce**

In a project with collections that have overridden `go.property` values, edit the script that defines those values to create a code error that will refuse to build, then fix the error.

The editor thinks the script no longer declares its `go.property` values and aggressively removes overrides of those values from files on disk (including files that are not open).

**Expected behavior**

Editor does not delete user data.

Note: This behaviour is probably desired when `go.property` values are removed, or possibly renamed, but it would probably be better to design some different behaviour. Here is an initial proposal:
* Leave all values in place in project files - even if the property no longer exists.
* Ignore properties that don't exist when building/creating the runtime files, but leave them present in the files.
* Notify user with build warnings that explain there are overrides where the parent property no longer exists.
* Only when user opens the offending files, prompt them to keep existing values and rename the properties they override, or remove them.

**Defold version:**

1.9.4

**Platforms:**
- Platforms: macOS
- OS: Sonoma 14.5

**Workaround:**

Use source control to keep a close eye on changes and revert changes the editor incorrectly makes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.