Skip to content

Custom Command arg types not being coerced #6

@kinggra1

Description

@kinggra1

[Godot Engine v4.6.2]

Was having issues with custom commands using non-string arguments. Dug a bit with a debugger and saw errors being thrown here when trying to assigned coerced values

Image

Fixed on my own project by setting coerced_args to be a default Array to avoid TypedArray data being copied over during duplication

func _safe_callv(callable: Callable, args: Array, command_name: String) -> Dictionary:
	var coerced_args: Array = []
	coerced_args.assign(args)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions