using System.Collections.Generic; using UnityEngine; public class SetBannerPos : MonoBehaviour { static List list_SetBannerPos = new List(); public static void Run() { list_SetBannerPos.ForEach(f => f.Start()); } private void Awake() { list_SetBannerPos.Add(this); } [Header("Need Full Rect")] public bool BannerPosIsBottom = true; private void Start() { var rt = GetComponent(); if (BannerPosIsBottom) rt.offsetMin = new Vector2(rt.offsetMin.x, SaveMgr.Ins.Get_ShopNoAD() ? 0f : 150f); else rt.offsetMax = new Vector2(rt.offsetMax.x, SaveMgr.Ins.Get_ShopNoAD() ? 0f : -150f); } }