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

Im not sure if this is a bug or not. #27

Open
Galllaa opened this issue Jun 22, 2023 · 11 comments
Open

Im not sure if this is a bug or not. #27

Galllaa opened this issue Jun 22, 2023 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Galllaa
Copy link

Galllaa commented Jun 22, 2023

Describe the bug
Hi, to make it short when i change the scene and go to the next and die it never reloads the current scene. I have a state machine and when im in Die-State after the animation is played it should reload the current scene and when the scene starts from the beginning i go to Spawn-State but it never happens.

To Reproduce
State Machine GD-Quest

Expected behavior
True - get_tree().reload_current_scene()

Screenshots
Video Bellow

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
I tried in the Die-State ( SceneManager.reload_scene() ) but same results. If i go (get_tree().change_scene_to_file()) so no SceneManager to change the scene it works as intended.

2023-06-22.12-29-00.mov
@jabsatz
Copy link
Collaborator

jabsatz commented Jul 15, 2023

Hello @Galllaa , do I understand correctly that, if you replace SceneManager.reload_scene() for get_tree().reload_current_scene(), everything works as intended? If so, that does sound like it might be an issue on our side, unfortunately I don't have enough information to reproduce this as-is. Do you have a link to the project you're using, that I could clone and test directly? Or could you create a minimal project where this is reproducible?

@jabsatz jabsatz added bug Something isn't working needs clarification Ticket description is incomplete or unclear labels Jul 15, 2023
@Galllaa
Copy link
Author

Galllaa commented Jul 16, 2023

Link to replicate the issue : https://www.mediafire.com/folder/k3ajypk45iyu5/SceneChangeTest if you want i can upload it to another site just let me know, is there a discord maybe it would be easier to communicate then over here.

@jabsatz
Copy link
Collaborator

jabsatz commented Jul 16, 2023

We don't have a discord unfortunately, I will try to check this out this week though

@jabsatz
Copy link
Collaborator

jabsatz commented Jul 16, 2023

Actually checking the link, it looks like I need MediaFire Premium to download files in bulk, could you upload a zipped folder or use a different service?
image

@Galllaa
Copy link
Author

Galllaa commented Jul 16, 2023

Yea shoud zip it before my bad. Here is the zipped project https://www.mediafire.com/file/z6pca5pz4j6rdtg/SceneChangeTest.rar/file
Tnx for taking time.

@Galllaa
Copy link
Author

Galllaa commented Aug 3, 2023

Any news for this?

@myin142
Copy link
Contributor

myin142 commented Sep 16, 2023

I had something similar happen recently. Do you get any errors when calling the reload_scene function that the scene file could not be found? I solved it by using a PackedScene.

@jertlemiah
Copy link

I don't know if this plugin is still being worked on, but I'm encountering this exact same issue

@jertlemiah
Copy link

It seems to be a problem with how the Change scene works. If I use the reload scene without changing scenes first, it works as expected. But changing the scene, then trying to reload the current scene causes the "Resource file not found: res:// (expected type: )" error
<C++ Error> Condition "!file_check->file_exists(p_path)" is true. Returning: Ref()
<C++ Source> core/io/resource_loader.cpp:279 @ _load()

@jertlemiah
Copy link

The way I got around this was to simply use change_scene on the current scene's path

@Welshy92
Copy link

Welshy92 commented May 22, 2024

I believe this issue is still happening. It only seems to occur on scenes that have been loaded with the scene managers change scene function. This is what I found:

  • If I use SceneManager.change_scene() and then the scene it loads uses SceneManager.reload_scene() at any point during that scene, the transition will play but then the scene will continue as if nothing happened. (No errors either)

  • If I use SceneManager.change_scene() and then the scene it loads uses 'get_tree().reload_current_scene()` at any point during that scene, nothing happens (No errors either)

  • If I use get_tree().change_scene_to_file() and then the following scene uses SceneManager.reload_scene(), this will work as intended.

My personal workaround is instead of using SceneManager.change_scene() , I used the SceneManager.fade_out() function, then get_tree().change_scene_to_file() and then called SceneManager.fade_in() on the new scene. This then meant the SceneManager.reload_scene() was working correctly. It's a couple of extra steps but it works exactly how I expected the normal method to.

@jabsatz jabsatz added help wanted Extra attention is needed and removed needs clarification Ticket description is incomplete or unclear labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants