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

Editing exported boolean of base scene child is not working in inherited scene #3904

Closed
Tracked by #4778
kubecz3k opened this issue Mar 2, 2016 · 11 comments
Closed
Tracked by #4778
Milestone

Comments

@kubecz3k
Copy link
Contributor

kubecz3k commented Mar 2, 2016

Operating system or device:
Ubuntu 15.10, Godot 2.0

Issue description (what happened, and what was expected):
If base scene consist of subscene with exported boolean value, editing this value from inherited scene will not always be saved.

Steps to reproduce:
Easy way:
1.Download sample project.
2. Open "InheritedScene.tscn"
3. Change "Some bool" variable to false
4. Save the scene
5. Reopen the scene
6. Observe "Some bool" is still true

Manual way:

  1. Create a "baseScene.tscn"
  2. Create "subscene.tscn"
  3. Instance subscene.tscn inside "baseScene.tscn"
  4. Create new inherited scene based on "scene1.tscn", save it as "inheritedScene.tscn"
  5. Add a script to subscene.tscn,
  6. Inside this script add export (bool) var someBool = false;
  7. Inside baseScene.tscn change someBool of instancied subscene.tscn to true
  8. Do all the steps from "Easy way", except the step 1.

Link to minimal example project (optional but very welcome):
Wideo that illustrates the problem: https://youtu.be/wgcsQ5nOGco
Sample project: SubsceneInheritedSceneBooleanValueIssue.zip

@kubecz3k kubecz3k added this to the 2.1 milestone Mar 2, 2016
@OvermindDL1
Copy link

As I recall, that is by design, because when you save the child scene it
sets defaults, but when that scene is loaded into another it uses the
defaults 'at the time it was saved' and uses those from then on out.

On Wed, Mar 2, 2016 at 1:22 PM, kubecz3k notifications@github.com wrote:

Operating system or device:
Ubuntu 15.10, Godot 2.0

Issue description (what happened, and what was expected):
If base scene consist of subscene with exported boolean value, editing
this value from inherited scene will not always be saved.

Steps to reproduce:
Easy way:
1.Download sample project.
2. Open "InheritedScene.tscn"
3. Change "Some bool" variable to false
4. Save the scene
5. Reopen the scene
6. Observe "Some bool" is still true

Manual way:

  1. Create a "baseScene.tscn"
  2. Create "subscene.tscn"
  3. Instance subscene.tscn inside "baseScene.tscn"
  4. Create new inherited scene based on "scene1.tscn", save it as
    "inheritedScene.tscn"
  5. Add a script to subscene.tscn,
  6. Inside this script add export (bool) var someBool = false;
  7. Inside baseScene.tscn change someBool of instancied subscene.tscn to
    true
  8. Do all the steps from "Easy way", except the step 1.

Link to minimal example project (optional but very welcome):
Wideo that illustrates the problem: https://youtu.be/wgcsQ5nOGco
Sample project: SubsceneInheritedSceneBooleanValueIssue.zip
https://github.com/godotengine/godot/files/155565/SubsceneInheritedSceneBooleanValueIssue.zip


Reply to this email directly or view it on GitHub
#3904.

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Mar 2, 2016

@OvermindDL1 this is not by design, for other types of data like Vector3 default values are inherited correctly (you can see this in sample project). Take a look at the video since I'm not sure you got the issue correctly.

@bojidar-bg
Copy link
Contributor

@kubecz3k ~ What happens what you set it from false to true instead? Also, does it happen with numbers (try setting from 1 to 0)?

If it happens with numbers, but not with false->true, then I think it is a bit bigger issue...

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Mar 5, 2016

@bojidar-bg For numbers it's working fine. Interestingly when in base scene boolean is set to false then it's possible to save true value in inherited scene.

@bojidar-bg
Copy link
Contributor

@kubecz3k ~ does it... um... work with .xscn? 😄

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Mar 6, 2016

@bojidar-bg tested with xscn, no difference between xscn and tscn

@bojidar-bg
Copy link
Contributor

@kubecz3k ~ Then it seems a boolean-specific problem...

@sketchyfun
Copy link
Contributor

I appear to be having a similar problem with exported variables not being remembered, except mine seems to occur when the game is run. I have some exported strings which I set in the editor, and when I try and read them in-game, it says they're empty. If I change the name of the variable and set it again in the editor, then it contains the string as expected, but eventually stops working and becomes empty again.

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Mar 9, 2016

@sketchyfun this sounds like a different (but might be related) issue. It would be the best if you could create new issue, provide reproduction steps or some sample project. Thanks!

@sketchyfun
Copy link
Contributor

Yeah sorry, didn't mean to derail this! I'll try and get an example done and then I'll link to this issue

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Mar 9, 2016

@sketchyfun absolutely no problem here, it is just easier for developers when issues are separated (different issues = different testing steps, different moment of fixing, usually different prs that's fixing an issue, and so on) (I was giving you the info that it would be best to create new issue, not because I'm the author of this one, but because I'm in a godot bugsquad team (we are trying to keep github manageable) )

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

4 participants