diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 3d837d44689..dccdd244ef9 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -563,6 +563,9 @@ void register_scene_types() { /* REGISTER RESOURCES */ ClassDB::register_virtual_class(); + ClassDB::register_class(); + SceneTree::add_idle_callback(ParticlesMaterial::flush_changes); + ParticlesMaterial::init_shaders(); #ifndef _3D_DISABLED ClassDB::register_virtual_class(); @@ -580,10 +583,6 @@ void register_scene_types() { SceneTree::add_idle_callback(SpatialMaterial::flush_changes); SpatialMaterial::init_shaders(); - ClassDB::register_class(); - SceneTree::add_idle_callback(ParticlesMaterial::flush_changes); - ParticlesMaterial::init_shaders(); - ClassDB::register_class(); ClassDB::register_class();