How to create Multidimensional Array in typescript with property

Hello,

i want to create 2D array in my game but i cant figure out how to do i am just move to creator but did not find out about 2D array i can see it in document only mention single array.

this example is single array i need 2D array example if any one can help me then please send the answer.

typescript code

@property([cc.Sprite])
green: cc.Sprite[] = [];

Screenshot 2022-05-21 at 9.53.07 AM

Please tell me how to do for 2D array

Thanks in advance

@linrm @system
its Possible 2D array or not
Please check

thanks

You can create 2D array like this:


image

@linrm its look like 2D array but its ok but actually its not 2D array.

Thanks

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