How can I get the script of the sceneRoot node when using the OnSceneChange method of an EditorPlugin?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By FullBatteryCharge

I am currently writing an EditorPlugin using C#.

My goal is to open a scene and edit the properties of the script attached to the root node of the scene using a new mainscreen window (by creating some buttons that change the values of properties).

The current issue is that I am unable to get the script attached to the sceneRoot node that i receive from the OnSceneChange method. The node is of type Node3D, and the GetScript() method only returns a CSharpScript object, which I am unable to use in any meaningfull way.