Forum Discussion

Vicentekk's avatar
Vicentekk
Member
7 months ago
Solved

Editable array properties in scripts or an easier way to manage lists in the editor

Hi!,

I'm developing a quest system and I would like to know if there is any way to create editable array properties (for example, a list of IDs or objects) directly in the Horizon Worlds script editor. So far, I've only been able to use comma-separated strings and then split them in the script, or create several individual properties (quest1, quest2, quest3, etc.), which is not very scalable or convenient.

Is there any official way or trick to expose editable arrays in the properties panel? Or any recommended practice to manage lists more efficiently and cleanly in scripts?

Thanks in advance for any suggestions or experiences!

  • No editable array in the property panel. I haven't found the need for one, so there is likely a good solution for what you're trying to do. I know you're developing a quest system and want a list of IDs or objects, but what are those? Where are they coming from? You can often get the objects you need into a private variable array that is writable either by tag or spawning them.

4 Replies

  • No editable array in the property panel. I haven't found the need for one, so there is likely a good solution for what you're trying to do. I know you're developing a quest system and want a list of IDs or objects, but what are those? Where are they coming from? You can often get the objects you need into a private variable array that is writable either by tag or spawning them.

  • Yes, I will have to get used to working with tags, I like arrays in properties out of habit, and because when checking configurations I am more used to checking in the editor than internally in the script. But I will definitely have to adapt to the tag system, which is probably more efficient.
     
    Thanks for the reply!