private void DisplayAtomCube(IList coordinates, IList atomModels) { for (int i = 0; i < coordinates.Count; i++) { CreateAtomHB(i, coordinates, atomModels); } if (UIData.atomtype == UIData.AtomType.hyperball) { GameObject hbManagerObj = GameObject.FindGameObjectWithTag("HBallManager"); HBallManager hbManager = hbManagerObj.GetComponent <HBallManager>(); Debug.Log("HBall Manager INIT OUTSIDE"); hbManager.Init(); } else { GameObject cubeManagerObj = GameObject.FindGameObjectWithTag("CubeManager"); CubeManager cubeManager = cubeManagerObj.GetComponent <CubeManager>(); Debug.Log("Cube Manager INIT OUTSIDE"); cubeManager.Init(); } }