Custom Resource: notice when all export variables are set

Godot Version



I have a custom Resource that has a bunch of export properties. When all properties are set I want to do some calculation based on the properties.
How do I realise this?
A bad idea of mine: use seters and wait until all properties were set.

class_name CustomResource
extends Resource

@export var test: int = 10

func called_after_export_vars_set():
	... test ...

Thanks for any idea & help :smiley:

looks like you will need to use @tool for this. so whenever user changing the property by hearing the property_changed signal you do check if all the properties are valid first, if yes then do your calculation with these properties.
using EditorInspectorPlugin should make this possible.

1 Like

That is an awesome Idea, thanks a lot for your help :heart_eyes_cat:

1 Like