Skip to content

PackedArray description on resize method isn't as clear as Array's description of resize #12148

Description

@og-mrk

Your Godot version: v4.7.stable.official [5b4e0cb0f]

Issue description: I've noticed there's differences between Array.resize and the PackedArray's resize method, where the first paragraph isn't as clear as Array.resize, even though from functional stand point, both Array.resize and PackedArray's resize methods have the same outcome (resizes your array to the new size you've pass as an argument), it's true that you can't make PackedArray types read_only as you would with Array type, (as PackedArray is a Vector<Type> under the hood), and there's no make_read_only & is_read_only to be found, but this argument doesn't effect the first paragraph, it only affects the second, which talks about possible return values.

URL to the documentation page (if already existing):
Array's resize method: Array.
PackedArray resize method: packedbytearray, packedcolorarray, packedfloat32array, packedfloat64array, packedint32array, packedint64array, packedstringarray, packedvector2array, packedvector3array, packedvector4array.

Possible solution: Adopting a better version to all of these resize method descriptions would be best, and I think (in my opinion) that Array's resize method description is a lot clearer than what's found in PackedArray's one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:class referenceIssues and PRs about the class reference, which should be addressed on the Godot engine repositoryenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions