This class is a bridge between Godot and the Mono runtime. It exposes several low-level operations and is only available in Mono-enabled Godot builds.

See also godot.CSharpScript.

Static variables

@:native("Singleton")staticread onlySINGLETON:Object

Static methods

@:native("AttachThread")staticattachThread():Void

Attaches the current thread to the Mono runtime.

@:native("DetachThread")staticdetachThread():Void

Detaches the current thread from the Mono runtime.

@:native("GetDomainId")staticgetDomainId():Int

Returns the current MonoDomain ID.

Note: The Mono runtime must be initialized for this method to work (use godot.GodotSharp.isRuntimeInitialized to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash.

@:native("GetScriptsDomainId")staticgetScriptsDomainId():Int

Returns the scripts MonoDomain's ID. This will be the same MonoDomain ID as godot.GodotSharp.getDomainId, unless the scripts domain isn't loaded.

Note: The Mono runtime must be initialized for this method to work (use godot.GodotSharp.isRuntimeInitialized to check). If the Mono runtime isn't initialized at the time this method is called, the engine will crash.

@:native("IsDomainFinalizingForUnload")staticisDomainFinalizingForUnload(domainId:Int):Bool

Returns true if the domain is being finalized, false otherwise.

@:native("IsRuntimeInitialized")staticisRuntimeInitialized():Bool

Returns true if the Mono runtime is initialized, false otherwise.

@:native("IsRuntimeShuttingDown")staticisRuntimeShuttingDown():Bool

Returns true if the Mono runtime is shutting down, false otherwise.

@:native("IsScriptsDomainLoaded")staticisScriptsDomainLoaded():Bool

Returns true if the scripts domain is loaded, false otherwise.