From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- Assets/Scripts/Utils/UnityExtends.cs | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 Assets/Scripts/Utils/UnityExtends.cs (limited to 'Assets/Scripts/Utils/UnityExtends.cs') diff --git a/Assets/Scripts/Utils/UnityExtends.cs b/Assets/Scripts/Utils/UnityExtends.cs deleted file mode 100644 index d1a66f48..00000000 --- a/Assets/Scripts/Utils/UnityExtends.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public static class UnityExtends -{ - public static T GetOrAddComponent(this GameObject go) where T : MonoBehaviour - { - T component = go.GetComponent(); - if (component == null) - component = go.AddComponent(); - return component; - } - - -} -- cgit v1.1-26-g67d0