using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScrollViewItemFix : MonoBehaviour
{
    [SerializeField]
    public RectTransform reference;
    [SerializeField]
    float heitheWeight = 0.1f; //all is 1
    [SerializeField]
    float widthWeight = 1f;
    // Start is called before the first frame update
    void Start()
    {

    }


    // Update is called once per frame
    void FixedUpdate()
    {
        GetComponent<RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, reference.rect.width * widthWeight);
        GetComponent<RectTransform>().SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, reference.rect.height * heitheWeight);
    }
}
