Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Godot 4.2 AssetPlacer takes priority over starting scene scripts

A topic by AXiON created Jun 05, 2024 Views: 133 Replies: 1
Viewing posts 1 to 2

I'm not sure if this has happened to you before, but I've noticed some strange behaviour.

  1. When loading the AssetPlacer, I get a TypeLoadException while Godot is trying to load the plugin. I don't know if this is related to the .NET version or the pre-processor directives like `#if TOOLS`.
  2. When trying to load the AssetPlacer, it seems that it's attempting to load the plugin before a large number of scripts, including my starting scene and an Autoload. This causes the starting scene to bug out and throw exceptions relating to attaching C# scripts to nodes. 
  3. Turning on verbose mode shows that the scripts are eventually loaded, but long after the scene has already attempted to be loaded. 
  4. Removal of the AssetPlacer script causes my game to load correctly as normal.

Have you seen this kind of behaviour before?

I am not too sure on the life cycle of script loading or first startup in Godot. Ideally this should be an Editor-only plugin and Godot should not even attempt to load it at runtime (which is probably not even possible at this point). But for the most part, I don't know what causes AssetPlacer to take either priority over the starting scene, or simply take too long to load.

Developer

Hello AXiON,

That is a strange issue, I never had anything like this happen, also you are right, the plugin should be ignored when running a scene, as none of its scripts are actually contained in any scenes. #if TOOLS to my knowledge should exclude the plugin from the project when you export it, I am unsure about its behavior when running from the editor. I will investigate this further when I have the chance, for now I assume the best workaround in your case is to disable the plugin before running the scene. Sorry for the inconvenience.