AxibugEmuOnline/AxibugEmuOnline.Client/Assets/Script/Utility.cs

18 lines
405 B
C#
Raw Normal View History

2024-08-16 14:45:44 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace AxibugEmuOnline.Client
{
public static class Utility
{
public static void SetActiveEx(this GameObject go, bool active)
{
if (active && go.activeSelf) return;
if (!active && !go.activeSelf) return;
go.SetActive(active);
}
}
}