2024-10-23 15:35:12 +08:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEditor.PackageManager;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
public class UpdateChiclPosition : MonoBehaviour
|
|
|
|
{
|
|
|
|
short previousChildCount;
|
|
|
|
// Start is called before the first frame update
|
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
previousChildCount = (short)transform.childCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
if (transform.childCount>previousChildCount)
|
|
|
|
{
|
|
|
|
previousChildCount = (short)transform.childCount;
|
2024-10-23 17:10:04 +08:00
|
|
|
;
|
2024-10-23 15:35:12 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|