Before this, I had a designated boolean value that was set to false and checked every frame to run a function and reset to false if true. This is so much better.
Example:
class_name CollisionMirror
extends CollisionPolygon2D
@export var last_known_nodes:PackedVector2Array
@export var reference: Polygon2D
@export_tool_button("Update now")
var ETB_updatenow=self.update_now
func _process(_delta: float) -> void:
if reference:
update_now(true)
func update_now(check:=false):
var cur_values:=reference.polygon
if check and last_known_nodes==cur_values:
return
last_known_nodes=cur_values
self.polygon=cur_values
You must log in or register to comment.
I think this is Inspector Buttons:

Does Inspector Buttons run in the editor, tho?
And more importantly, where can I download one?
- He runs wherever he wants. He’s a cat.
- I got all mine from the Cat Distribution System.


