21 lines
507 B
C#
21 lines
507 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using static UnityEngine.UI.Button;
|
|
|
|
namespace XRLib
|
|
{
|
|
public static class ScrollRectExtension
|
|
{
|
|
public static void Clear(this ScrollRect rect)
|
|
{
|
|
var childCount = rect.content.transform.childCount;
|
|
for(int i =0;i<childCount;++i)
|
|
{
|
|
GameObject.DestroyImmediate(rect.content.transform.GetChild(0).gameObject);
|
|
}
|
|
}
|
|
}
|
|
|
|
} |