using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(RectTransform))] public class FlakeCollider : MonoBehaviour { [AutoUI] public Vector2 Position = new Vector2(460,0); [AutoUI] public Vector2 Size = new Vector2(400,400); private RectTransform rectTransform; // Start is called before the first frame update void Start() { rectTransform = GetComponent(); } // Update is called once per frame void Update() { rectTransform.anchoredPosition = Position; rectTransform.sizeDelta = Size; } }