void Start() { scriptCube scriptcube = new scriptCube(); GameObject cube = scriptCube.createCube("testeN", 10); }
void rotateGroup(GameObject[] tags, Vector3 axis, bool clockwise) { int direction; if (clockwise) { direction = 90; } else { direction = -90; } foreach (GameObject tag in tags) { tag.transform.parent.gameObject.transform.RotateAround(Vector3.zero, axis, direction); // update the cubes with their new positions and add them to their new groups cubeScript = tag.transform.parent.gameObject.GetComponent<scriptCube>(); cubeScript.updateCube(); } }