Hello There, my name is Eth Main I am the owner and the lead programmer of an indie studio called the state studio , I have been a C# and unity speciallist for 6 years and doing something like that is pretty easy, but if you just give me some time to make it look good.
the functions will be:
CreateCubes(GameObject[] mainCubes, GameObject[] subCubes,int number,Vector3 LastCubePosition,Vector3 SubCubesSize,float distance,float distanceBetweenSub)
DeleteCube(GameObject Cube)
I will include a simple project too :)
EDIT:
I have finished the project already with functions:
CreateCubes(GameObject[] mainCubes, GameObject[] subCubes,int number,Vector3 LastCubePosition,Vector3 SubCubesSize,float distance,float distanceBetweenSub,int maxcubeinline)
DeleteCube(GameObject Cube)
OptimizeCube(GameObject Cube)
SetCubePosition(GameObject MainCube,float x,float y,float z)
CreateMaterialForSubCube(GameObject SubCube,int r,int g,int b,int a)
I also included a test project so you can see how it works.
Features:
abillity to change the size of the sub cubes.
determine the position of each main cube.
abillity to create any main cube anytime inside the game.
optimized cubes and the sub cubes will only be rendered if the camera sees it.
abillity to change a sub cube's color without affecting other subcubes colors.
P.S it runs on 50 FPS on an intel core i3,nvidia geforce gt 710m,4gb ram (with 4 main cubes visible)