Godot Version
Godot_v4.3-stable_mono_win64
Question
After exporting my game using Export with Release, there is about a 20% chance that the following error will occur when opening a specific page:
USER ERROR: Cannot get class ''.
at: _instantiate_internal (core/object/class_db.cpp:515)
USER WARNING: Node of type cannot be created. A placeholder will be created instead.
at: instantiate (scene/resources/packed_scene.cpp:277)
USER ERROR: Cannot get class ''.
at: _instantiate_internal (core/object/class_db.cpp:515)
USER WARNING: Node of type cannot be created. A placeholder will be created instead.
at: instantiate (scene/resources/packed_scene.cpp:277)
USER ERROR: Cannot get class ''.
at: _instantiate_internal (core/object/class_db.cpp:515)
USER WARNING: Node of type cannot be created. A placeholder will be created instead.
at: instantiate (scene/resources/packed_scene.cpp:277)
USER ERROR: Scene instance is missing.
at: instantiate (scene/resources/packed_scene.cpp:244)
I am using C# for development, and the error seems to be coming from the following code:
var packagedScene = ResourceLoader.Load<PackedScene>(path);
var instance = packagedScene.Instantiate();
The issue is that during the development phase and when using Export With Debug, this problem never occurs, even after extensive testing. However, it only happens when using Export with Release.
I’m reaching out to see if anyone else has encountered this issue and found a solution, or if there are any specific things to watch out for when using Export with Release.