You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
637 B

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<RectTransform>();
}
// Update is called once per frame
void Update()
{
rectTransform.anchoredPosition = Position;
rectTransform.sizeDelta = Size;
}
}