Boolean array property in typescript

Hi, I am using typescript for my project and i want to access Boolean value in array in property panel.
@property(cc.Boolean)
isDragged: [Boolean] = [false];

But I am not able to see the Boolean array in property panel. I dont know where i am making mistake. Please help. Thanks in advance.

1 Like

In Typescript you should declare de type of an array as type[]. To the creator, you should pass [cc.Boolean] as an argument to the property decorator, to get the property in the panel.

@property([cc.Boolean])
text: boolean[] = [];
2 Likes

thanks :slight_smile: