I have a JS that picks a random material from a built-in Array of 10 different materials every 5’’ and assigns it to a gameObject. I want the materials that make up the Array, to have different possibilities of being selected and was thinking of doing something in this logic, only in JavaScript (make a 2d array, where the first column is a material and the second is how many times this material appears).
I read in Eric’s JavaScriptMultiDimArrays article that “now you can use the MultiDim class and type inference to declare rectangular 2D and 3D arrays of ints, floats, and strings”.
So this means that I cannot make a 2D built-in Array that contains materials and their occurrence?