PackedStringArrayRead
gdext.builtin.PackedStringArrayRead
object PackedStringArrayRead
Reads a PackedStringArray returned by a no-argument engine method into a Scala Seq[String].
The code generator drops methods whose return type is PackedStringArray (the Ptrcall seam has no case for it), so the few we need — AnimationMixer.get_animation_list, SpriteFrames.get_animation_names — are unreachable through generated wrappers. This is the bespoke reader for them: call the bind via object_method_bind_ptrcall into a heap-sized buffer, read the element count via the PackedStringArray.size builtin method, then decode each element through packed_string_array_operator_index (which hands back an interior pointer to the element String — read it, never destroy it). The array value itself is owned by us and destroyed when done.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Members list
In this article