UI 재배치 함수 작업
This commit is contained in:
parent
31d8951681
commit
fbff8bbe75
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEditor.VersionControl;
|
||||
using UnityEngine;
|
||||
|
||||
public class ImgaeSizeSet : MonoBehaviour
|
||||
{
|
||||
|
||||
private void Start()
|
||||
{
|
||||
RectTransform rt = gameObject.GetComponent<RectTransform>();
|
||||
RectTransform changeRt = gameObject.GetComponentsInChildren<RectTransform>()[1];
|
||||
float sizeSet = (rt.sizeDelta.y / 2) - 10;
|
||||
changeRt.offsetMin = new Vector2(-sizeSet, 10.0f);
|
||||
changeRt.offsetMax = new Vector2(sizeSet, -10.0f);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 779603858213a464baa85dedf2ff4b9c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue