Skip to content

Commit ed9dc6f

Browse files
committed
Update autoload.gd
1 parent 34ddc09 commit ed9dc6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: addons/ProCam2D/scripts/autoload.gd

+4-1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ func _on_scene_changed():
323323
var cam_g = get_tree().get_nodes_in_group("procam")
324324
if not cam_g.is_empty():
325325
cam = cam_g[0]
326+
var old_pcam_nodes : Array = cam._cinematics + cam._rooms + cam._paths + cam._zooms + cam._magnets
326327
cam._gather_influence_nodes()
327-
cam._setup_spatial_hash()
328+
var new_pcam_nodes : Array = cam._cinematics + cam._rooms + cam._paths + cam._zooms + cam._magnets
329+
if old_pcam_nodes.size() != new_pcam_nodes.size():
330+
cam._setup_spatial_hash()
328331
else: cam = null

0 commit comments

Comments
 (0)