From 0e7178a740f9ad23c5ce84fcdd0ff4713f9bc387 Mon Sep 17 00:00:00 2001 From: volzhs Date: Sat, 25 Aug 2018 02:23:40 +0900 Subject: [PATCH] Make ParticlesMaterial included with disable_3d=yes option --- scene/register_scene_types.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index da4e2f991d5..070ad157c11 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -564,6 +564,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(); @@ -581,10 +584,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();