diff options
Diffstat (limited to 'scene/2d/particles_2d.cpp')
-rw-r--r-- | scene/2d/particles_2d.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp index ffea060e82..29dad630d6 100644 --- a/scene/2d/particles_2d.cpp +++ b/scene/2d/particles_2d.cpp @@ -198,13 +198,21 @@ void ParticleAttractor2D::set_particles_path(NodePath p_path) { path=p_path; _update_owner(); + update_configuration_warning(); } NodePath ParticleAttractor2D::get_particles_path() const { return path; } +String ParticleAttractor2D::get_configuration_warning() const { + if (!has_node(path) || !get_node(path) || !get_node(path)->cast_to<Particles2D>()) { + return TTR("Path property must point to a valid Particles2D node to work."); + } + + return String(); +} ParticleAttractor2D::ParticleAttractor2D() { |