Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported vars not immediatelly updating for inherited scenes. #5997

Closed
Tracked by #4778
kubecz3k opened this issue Aug 1, 2016 · 7 comments
Closed
Tracked by #4778

Exported vars not immediatelly updating for inherited scenes. #5997

kubecz3k opened this issue Aug 1, 2016 · 7 comments

Comments

@kubecz3k
Copy link
Contributor

kubecz3k commented Aug 1, 2016

Operating system or device - Godot version:
Ubuntu 16.04, f86176d commit

Issue description (what happened, and what was expected):
It's possible to accidentally modify exported values for inherited scenes in some scenarios. If you change exported var in base scene, and at the same time you have opened third party scene which is holding inherited scenes, then exported values for those instanced inherited scenes wont be updated.

Steps to reproduce:

  1. Create BaseScene, attach a script to a scene, declare exported var someValue = 3
  2. Create InheritedScene which is based on BaseScene
  3. Create new 'World' scene.
  4. Add InheritedScene to WorldScene.
  5. Save
  6. Don't close World Scene
  7. Modify Exported vars of BaseScene to 5 and save it
    8. Change anything in WorldScene
  8. Save WorldScene
  9. Reopen World Scene, exported var of InheritedScene node will be 3

Link to minimal example project (optional but very welcome):
Video that demonstrates the issue: https://youtu.be/6juDGlZo2Bw
Sample Project to make your own tests: (not sure if this is really needed since you still need to understand reproduction steps and perform some of them):
InheritPropertyNotUpdated.zip

I'm not 100% sure if this bug qualify for fix before 2.1 but I assume It might be good thing to be considered (since updating scenes with big number of inherited scenes is painfully). Also I think this bug is not present in 2.0 branch

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Aug 7, 2017

retested today on e12b422 it's still valid

@reduz
Copy link
Member

reduz commented Sep 29, 2017

I remember I recently changed this, if you change the exported value from the code, and the same value is used, it will be modified.

@kubecz3k
Copy link
Contributor Author

Will recheck at the beginning of the next week

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Oct 4, 2017

The issue is still valid in ef08228

@reduz
Copy link
Member

reduz commented Nov 13, 2017

This is actually working, the problem is that you have a scene that contains the integer value as 3 (BaseGameObject) and by the time the instanced one is loaded, it will understand this as the actual value.. just for the fact that it's what it was saved. Even if you modify it.

I will close this because I think it's quite a corner case and working it around (checking what is loaded instead of using what is saved) may result in another batch of inconsistencies.

@reduz reduz closed this as completed Nov 13, 2017
@kubecz3k
Copy link
Contributor Author

Well don't think it's a corner case, I very often have some main 'level' scene open at the time where I'm working with other smaller scenes. In a result subscenes that are added already to big 'Level' scene are transparently become out of sync. Usually it ends with some bugfix hunting couple days/weeks later.

@kubecz3k
Copy link
Contributor Author

I off-course can be wrong and it's a minor use-case. Guess we can wait and see if more people will report something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants