stride3d / stride3d/stride

Public variables are not updated on editor when changed on script

Open
#2,979 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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:

  1. Create a script and declare a public variable on it
  2. Attach the script to an Entity
  3. Update the value of the variable on script
  4. 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

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.