| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | | using UnityEngine; |
| | | |
| | | [RequireComponent(typeof(RectTransform))] |
| | |
| | | |
| | | GameObject springDecorate = null; |
| | | |
| | | private void Start() |
| | | private async void Start() |
| | | { |
| | | if (GeneralDefine.UISpringDecorate != 0) |
| | | { |
| | | if (springDecorate == null) |
| | | { |
| | | springDecorate = UIUtility.CreateWidget("Container_SpringDecorate", "SpringDecorate"); |
| | | springDecorate = await UIUtility.CreateWidget("Container_SpringDecorate", "SpringDecorate"); |
| | | if (this == null || springDecorate == null) |
| | | { |
| | | if (null != springDecorate) |
| | | { |
| | | DestroyImmediate(springDecorate); |
| | | } |
| | | return; |
| | | } |
| | | } |
| | | var rectTransform = springDecorate.transform as RectTransform; |
| | | rectTransform.MatchWhith(this.transform as RectTransform); |