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

Parser Error: Could not find type "DialogueResource" in the current scope. #331

Closed
germanbv opened this issue Oct 21, 2023 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@germanbv
Copy link

Describe the bug
After adding this addon to my project, I have started to experience this issue when hitting the play button... the engine randomly freezes until it displays Parser Error: Could not find type "DialogueResource" in the current scope. on dialogue_manager.gd line 76 (get_next_dialogue_line) and the game crashes, if I restart I have a good chance of not triggering the issue.

From what I've read, this seems to be an engine-related bug that has been around since 2019 and has to do with the engine not loading singletons on Autoload, I'm not sure though, since DialogueResource is a global class rather than a singleton... maybe you know a workaround for this?... I was thinking of maybe creating a c# version that's not part of the addon folder to see if the problem persists...

For reference see: godotengine/godot#32759

I have to add that DialogueManager is the only singleton I have on AutoLoad and it is the only addon I'm using on my project, in the other hand I also have other classes inheriting from Resource which don't have any problem.

Affected version

  • Dialogue Manager version: 2.26.0
  • Godot version: 4.1 Mono

To Reproduce
Steps to reproduce the behavior:
Add the addon and execute your game... The problem triggers randomly but it used to be more frequent after modifying a script file. Keep in mind that I'm using the Mono version and I'm working with C#. I haven't tested this on a normal version.

@germanbv germanbv added the bug Something isn't working label Oct 21, 2023
@nathanhoad
Copy link
Owner

Whenever I've run into missing classes I usually delete the .godot folder and let Godot rebuild all of the caches.

@germanbv
Copy link
Author

germanbv commented Oct 21, 2023

thanks!, I'll try that and I'll report back if the problem persists.

@germanbv
Copy link
Author

deleting the .godot folder didn't solve the issue, this seems to trigger after modifying C# scripts

@nathanhoad
Copy link
Owner

I've just merged in some improvements to the C# stuff including this line that might help with the error that you're seeing. I do think it's an engine bug but hopefully this is a workaround for now.

@germanbv
Copy link
Author

thank you! I'll try that out... and yes, the problem is an engine-related bug... I kept investigating and it might be the same issue explained in: godotengine/godot#75388

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants