Access scene object from a EditorProperty script.

Godot Version

v4.3.stable.arch_linux

Question

I’m using an EditorProperty script to add a new way to edit the Rect2 values in the inspector (I’m mostly following the docs guide). I’m trying to acces the scene object, which has the Rect2 value I’m editing. I want to create an instance as a child to that scene object. However I don’t know if and how I can access the scene object.

My reason behind this is that I have a scene consisting of 2 Marker2D objects to select the area of a Rect2. So I want to be able to spawn an instance of this scene to use as a visual method of selecting the Rect2 parameters of any object I have in the editor.