rabidus-test/Assets/CurvedUI/Demo Scenes/Demo Scenes Content/CUI_ShowParentCoordinates.cs

17 lines
355 B
C#
Raw Normal View History

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class CUI_ShowParentCoordinates : MonoBehaviour {
// Use this for initialization
void Start () {
this.GetComponent<Text>().text = transform.parent.GetComponent<RectTransform>().anchoredPosition.ToString();
}
// Update is called once per frame
void Update () {
}
}