derkork / godot-statecharts

A state charts extension for Godot 4
MIT License
734 stars 35 forks source link

"Could not find type "Transition" in current scope" error #60

Closed Crusher48 closed 7 months ago

Crusher48 commented 8 months ago

My project is primarily a C# project, but is currently using Godot State Charts as an AI solution. However, this appears to create an issue where sometimes the project freezes on launch and produces a parser error: "Could not find type "Transition" in current scope", pointing to res://addons/godot_state_charts/state_chart.gd - line 13. Luckily, restarting the game always fixes this issue and manually building the project before launching the game usually prevents the issue from occurring, but it is still a significant workflow disruption.

Some solutions that have already been tried include deleting and reimporting the project, updating Godot versions (I am currently using the Godot 4.2 release), and clearing cache files that may point to a broken file link.

derkork commented 8 months ago

Hmm that is rather odd indeed. Did this also occur in previous Godot versions or only in 4.2?

Crusher48 commented 8 months ago

I believe it occurred in every version I used it in, starting in either 4.1 or the 4.2 beta versions.

derkork commented 8 months ago

Okay, I just tried running it in 4.0 and 4.2 and that seemed to work. That's not helping you of course, but its kinda hard to fix a problem one cannot reproduce. Would you happen to have a demo project where this occurs that I could use to reproduce and fix the problem?

derkork commented 7 months ago

I'm closing this for now, as I cannot reproduce it and without being able to reproduce it I cannot really fix it. If you happen to have a sample project where this happens it would help tremendously.