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

17 lines
355 B
C#
Raw Permalink Normal View History

2023-08-15 17:38:54 +03:00
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 () {
}
}