C7-Game / Prototype

An early-stage, open-source 4X strategy game
https://c7-game.github.io/
MIT License
34 stars 9 forks source link

godot4 fix: remove autoloaded nodes #427

Closed pcen closed 1 year ago

pcen commented 1 year ago

The reason for this change is that we are seeing issues opening the C7 project on the godot4 branch in the editor on linux: image Which may potentially be the same as this issue, which is reproducible in Godot 4.1 by creating a new project and adding an autoloaded C# node. This fix removes all autoloaded nodes: GlobalSingleton becomes a singleton managed by C# using System.Lazy LogManager becomes a purely static class with a static constructor running before methods are accessed, and currently LogManager.ShutDown() will need to be called whenever the application is closing in order to flush the log (ie. for every scene, have the top level node override _ExitTree and invoke LogManager.ShutDown, if exiting the tree implies the entire application is closing. Obviously we need a better solution for flushing the log in the future)

benskywalker commented 1 year ago

I am no longer experiencing this issue on Linux, and it seems like a phantom issue caused by incompatibility with Vulkan or having dotnet 6 instead of 7. Seems like this might be fine to close?

pcen commented 1 year ago

closing for now until this issue comes up again