using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class GameObjectEx {
public static GameObject show(this GameObject self)
{
self.SetActive(true);
return self;
}
public static GameObject hide(this GameObject self)
{
self.SetActive(false);
return self;
}
public static GameObject DestroySelf(this GameObject self)
{
GameObject.Destroy(self);
return self;
}
}
咦~this扩展还可以这样(滑稽)
猜你喜欢
转载自blog.csdn.net/lvcoc/article/details/88058931
今日推荐
周排行