Is there a way to export an array with multiple perameters

Godot Version

4.4.1

Question

So basically what I want is in the editor, when I click 'Add Element' is there a way to make it so multiple values come up at once there? So like a string and a boolean rather than just a string at a single press?

You can export a Dictionary instead, which has a key value pair.

1 Like

Oh Thank you! I completely forgot about dictionaries

1 Like

Is there a way to change the text : ‘new key’ and ‘new Value’ if not that’s totally fine, I’ll just put it into the documentation but If I can change it’ll make it more designer friendly

You can give it a type hint but I’m not sure if the editor itself will honor it.

Ah okay, well thank you! I’ve decided to just do 2 arrays and describe it in detail in the documentation, but I appreciate the help!

1 Like

This is what i use for audio manager

On my audio_manager.gd

@export var music_library: Array[AudioLibraryEntry] = []

.tres

class_name AudioLibraryEntry
extends Resource

@export var key: StringName = ""
@export var stream: AudioStream

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.