// Update is called once per frame void Update() { if (!MainGameLogic.IsMainMenu()) { return; } if (magicCube == null && GameObject.FindGameObjectWithTag("MagicCube") != null) { magicCube = GameObject.FindGameObjectWithTag("MagicCube"); } if (magicCube != null) { if (magicCube.GetComponent <MagicCubeBehaviour>().getMagicCubeManager() != null) { MainGameLogic.GetMainCamera().transform.RotateAround(magicCube.GetComponent <MagicCubeBehaviour>().getMagicCubeManager().GetPivot(), new Vector3(0, 1, 1), Time.deltaTime * 30.0f); } } }