Public variables are not updated on editor when changed on script
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release/GitHub (please choose appropriate option)
Version: 4.3.0.2507
Platform(s): Windows
Describe the bug
When a public variable is declared on script, it is only updated on editor when attached to an entity for the first time. The variables are not updated on editor when changed via script. This can became a headache if many entities share the same script but a value needs to be changed.
To Reproduce
Steps to reproduce the behavior:
- Create a script and declare a public variable on it
- Attach the script to an Entity
- Update the value of the variable on script
- Confirm value is not updated on editor or on run
Expected behavior
When a public variable changed on Script, the editor values should also be updated unless they are modified before (An option to clear override on editor can be added)
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.
Research direction
Start by reproducing the Windows steps with a shared script and trace how public variable changes move between the script, attached entity, editor, and run state. Confirm the intended handling of editor overrides before changing behavior; done means script changes update unmodified editor values and the reproduction no longer fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100