Musab
#1
how do i create an array property and have like different properties inside of it
arr: [
balloon0bt: {
default: null,
type: cc.Node
},
balloon1bt: {
default: null,
type: cc.Node
},
balloon2bt: {
default: null,
type: cc.Node
},],
1 Like
Karg
#2
i’d do it this way (in typescript)
@property(cc.Node)
protected balloons: cc.Node[] = [];
if, instead of array of cc.Node you want a custom component that you also want to edit its properties, then it’s a different approach.
4 Likes
Musab
#3
can you show me that approach ?
Musab
#4
balloons: [cc.RichText],
this is how its done in js
2 Likes
system
closed
#5
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.