c# - Create 3 dimensional grid two elements, one element in one row but in random columns -
I have created a 3-dimensional grid for filling the grid's empty space. I have two different objects. One should be in one line, but on the randomly selected column.
Anyone before this or someone will tell me in the right direction?
I am using Unity and C # Thank you.
Vector 3 = Towerisan = new vector 3 (3, 3, 3); Create a grid tower for // (int x = 0; x is the code for the grid. I tried to place two objects in a single list on those objects, but random column objects are found in the same column when I do this with the code I i Then thought that two types of cubes were put in separate lists which became more dirty. Does that help support the code?
I know this is a very old question to me. It was a project that was canceled. I randomly came on this and with curiosity I decided to try to fulfill this particular issue, I was having such a problem, then back. And I did.
public vector 3 towerasis = new vector 3 (3, 3, 3); Public game object tile; Public game object random tile; For debugging purposes // Public Variables // In the last inspector does not see any real need cleaner even if they hide hidden public int tile selected; Public listing & lt; GameObject & gt; AllTiles; Zero Start () {// For Grid Tower (int x = 0; x & lt; towerSize.x; x ++) {for (int z = 0; z
It is good to see how you have improved over time. Only if someone else will benefit from the solution again, I apologize for bringing it back.
Comments
Post a Comment