Default of Vec3 attribute

I’ve been trying to set default values for a Vec3 attribute, but it seems nothing working.

MyScript.attributes.add("durations",
{
type:"vec3",
title:"Durations",
default:new pc.Vec3(0,2,1)
});

Is there a bug? Or am I doing something wrong?

Do:

MyScript.attributes.add("durations", {
    type: "vec3",
    title: "Durations",
    default: [ 0, 2, 1 ]
});

Nope

As soon as I add it, the attribute disappears from the inspector.

Works for me:

https://playcanvas.com/editor/scene/965287

Oh, it works!
Yet, if I add array:true it breaks. Does it not work with arrays?

I guess not, no.

Ouch. Well, I can do with workarounds :sweat_smile: