update
This commit is contained in:
27
Assets/Plugins/XRLib/UI/ButtonExtension.cs
Normal file
27
Assets/Plugins/XRLib/UI/ButtonExtension.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using static UnityEngine.UI.Button;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
public static class ButtonExtension
|
||||
{
|
||||
public delegate void CustomAction();
|
||||
public delegate void CustomAction<T>(List<T> values);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user