// Use this for initialization void Start () { MyPosition = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>(); switch (color) { case ObjectColor.Red: gameObject.GetComponent<MeshRenderer>().material.color = Color.red; break; case ObjectColor.Blue: gameObject.GetComponent<MeshRenderer>().material.color = Color.blue; break; case ObjectColor.Green: gameObject.GetComponent<MeshRenderer>().material.color = Color.green; break; case ObjectColor.Yellow: gameObject.GetComponent<MeshRenderer>().material.color = Color.yellow; break; default: break; } //Aqui voy a poner la distancia en lugar del nombre gameObject.GetComponentInChildren<TextMesh>().text = description; float z = (float)PositionUtilities.DrawCubeY(latitude); float x = (float)PositionUtilities.DrawCubeX(longitude); gameObject.transform.position = new Vector3(x, 0, z); }
void Awake() { gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>(); cm = GameObject.FindGameObjectWithTag("Ui").GetComponent<CanvasManager>(); PositionUtilities.Init(); }
void Awake() { gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>(); }
void Awake() { gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>(); creator= GameObject.FindGameObjectWithTag("creador").GetComponent<createObject>(); }