Passing arrays from GDNative

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

How I’m supposed to use the godot_pool_XX_array_write_access structs to pass data from within my C code to godot?
Using the append/insert/set functions is not efficient for large number of elements.

Edit: How to put underscores here?

For adding code here, use backticks, “``”.

Ertain | 2018-08-06 16:11

:bust_in_silhouette: Reply From: lefttothewind

To answer myself, I used godot_pool_byte_array_write to get the struct that I passed to godot_pool_byte_array_write_access_ptr to get a pointer that I can use with memcpy and such.