Created
June 21, 2011 14:37
-
-
Save boj/1037990 to your computer and use it in GitHub Desktop.
Cube Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class SystemController : MonoBehaviour { | |
const int size = 64; | |
public GameObject[][] cubes = new GameObject[size][]; | |
public GameObject clone_cube; | |
void Awake() { | |
clone_cube = GameObject.CreatePrimitive(PrimitiveType.Cube); | |
//clone_cube.renderer.material.shader = Shader.Find("Bojo"); | |
for (int i = 0; i < cubes.Length; i++) { | |
cubes[i] = new GameObject[size]; | |
} | |
for (int i = 0; i < cubes.Length; i++) { | |
for (int j = 0; j < cubes[i].Length; j++) { | |
cubes[i][j] = Instantiate(clone_cube, new Vector3((i * 1.5F) - (size / 2), (j * 1.5F) - (size / 2), size * 2), Quaternion.identity) as GameObject; | |
} | |
} | |
clone_cube.renderer.enabled = false; | |
} | |
void Start() { | |
} | |
void Update() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment