Export Variant for Inspector

Godot Version

4.4 Stable

Question

Is there a way to export just a variant so that in the inspector you can create any type of variant variable?

I know that you can create an array and just have one element. But obviously that’s not ideal.

Essentially I would like this:

With the ability to create a new variant from the drop-down. But without the array part. Is this possible?

Edit: Forgot to mention I’m doing this in c#

You’ll need to create an inspector plugin and re-create that behavior as I don’t think it’s exposed.

1 Like

Okay so if that is really true than that’s terrible news. So in the mean time I whipped up something using _GetPropertyList() and created an enum to choose the type and create a variant. See image:

How you create variant from this enum?

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