pub unsafe fn create_script_instance<T: ScriptInstance>(
rust_instance: T,
for_object: Gd<T::Base>,
) -> RawPtr<*mut c_void>Expand description
Creates a raw pointer to a Godot script instance, from a Rust ScriptInstance object.
See ScriptInstance for usage. Discarding the resulting value will result in a memory leak.
The exact GDExtension type of the pointer is sys::GDExtensionScriptInstancePtr, but you can treat it like an opaque pointer.
ยงSafety
The caller must ensure that for_object is not freed before passing the returned pointer back to Godot.