summaryrefslogtreecommitdiff
path: root/Assets/Test/15_RectTransform/RectTransformDetail.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Test/15_RectTransform/RectTransformDetail.cs')
-rw-r--r--Assets/Test/15_RectTransform/RectTransformDetail.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/Assets/Test/15_RectTransform/RectTransformDetail.cs b/Assets/Test/15_RectTransform/RectTransformDetail.cs
new file mode 100644
index 0000000..05dc4fb
--- /dev/null
+++ b/Assets/Test/15_RectTransform/RectTransformDetail.cs
@@ -0,0 +1,43 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+[ExecuteInEditMode]
+public class RectTransformDetail : MonoBehaviour {
+
+ public Vector3 localPosition;
+ public Vector3 position;
+ [Space]
+ public Vector2 anchorPosition;
+ public Vector3 anchorPosition3D;
+ public Vector2 anchorMin;
+ public Vector2 anchorMax;
+ public Vector2 offsetMin;
+ public Vector2 offsetMax;
+ public Vector2 pivot;
+ public Rect rect;
+ public Vector2 sizeDelta;
+
+ private RectTransform rectTransform;
+
+ // Use this for initialization
+ void Start () {
+ rectTransform = GetComponent<RectTransform>();
+
+ }
+
+ // Update is called once per frame
+ void Update () {
+ position = rectTransform.position;
+ localPosition = rectTransform.localPosition;
+
+ anchorPosition = rectTransform.anchoredPosition;
+ anchorPosition3D = rectTransform.anchoredPosition3D;
+ anchorMin = rectTransform.anchorMin;
+ anchorMax = rectTransform.anchorMax;
+ offsetMin = rectTransform.offsetMin;
+ offsetMax = rectTransform.offsetMax;
+ pivot = rectTransform.pivot;
+ rect = rectTransform.rect;
+ sizeDelta = rectTransform.sizeDelta;
+ }
+}